{ "swagger": "2.0", "info": { "title": "DriveBC's Open511 API", "description": "This API is DriveBC's implementation of the Open511 specification. It provides information about known road events (traffic accidents, construction, etc.) in British Columbia, Canada.", "version": "1.0.0", "license": { "name": "Open Government License - British Columbia", "url": "http://www2.gov.bc.ca/gov/content?id=A519A56BC2BF44E4A008B33FCF527F61" }, "termsOfService": "http://www2.gov.bc.ca/gov/content?id=D1EE0A405E584363B205CD4353E02C88", "contact": { "name": "Drive BC", "url": "http://www.drivebc.ca/", "email": "TRANBMClientRelations@gov.bc.ca" } }, "externalDocs": { "description": "DriveBC Open511 API Guidelines", "url": "http://api.open511.gov.bc.ca/help" }, "host": "api.open511.gov.bc.ca", "basePath": "/", "tags": [ { "name": "resources" } ], "schemes": [ "http", "https" ], "produces": [ "application/json" ], "paths": { "/events": { "get": { "summary": "Lists road events", "description": "The events resource provides information about road events (e.g. accidents, construction, special events). The response is a list of event elements matching the filtering parameters if any are provided. ", "parameters": [ { "name": "format", "in": "query", "description": "The format of the response", "type": "string", "required": false, "default": "json", "enum": [ "json", "xml" ] }, { "name": "status", "in": "query", "description": "Limits the response to events having a given status.", "type": "string", "default": "ALL", "enum": [ "ALL", "ACTIVE", "ARCHIVED" ] }, { "name": "severity", "in": "query", "description": "Limits the response to events tagged with one of the listed severity values. The possible values are: [MINOR, MODERATE, MAJOR]. Multiple values may be listed, and should be separated by a comma. The default is to return events of any severity.", "type": "string", "default": "MAJOR" }, { "name": "jurisdiction", "in": "query", "description": "Limits the response to events reported by a given jurisdiction. The value given must be specified as the ID of a jurisdiction returned by the /jurisdiction resource. The default is to return events from all jurisdictions.", "type": "string", "required": false, "default": "drivebc.ca" }, { "name": "event_type", "in": "query", "description": "Limits the response to events tagged with one of the listed event types. The possible values include: [CONSTRUCTION, INCIDENT, SPECIAL_EVENT, WEATHER_CONDITION]. Multiple values may be listed, and should be separated by a comma. The default is to return events of all types.", "type": "string", "required": false, "default": "INCIDENT", "enum": [ "CONSTRUCTION", "SPECIAL_EVENT", "INCIDENT", "WEATHER_CONDITION", "ROAD_CONDITION" ] }, { "name": "created", "in": "query", "description": "Limits the response to events based on the date and time that the event was created (first recorded). The date/time must be specified in ISO 8601 format, and may be prefixed by one of the following operators [<, <=, >, >=] to indicate 'before', 'before or equal to', 'after' or 'after or equal to' respectively. For example, >2013-12-01T12:00:00Z requests all events create after Dec. 1, 2015 at 12pm (noon) Coordinated Universal Time. The default is to return events with any creation time.", "type": "string", "required": false, "default": ">2015-09-01T12:00:00Z" }, { "name": "updated", "in": "query", "description": "Limits the response to events based on the date and time that the event was last updated. The date/time must be specified in ISO 8601 format, and may be prefixed by one of the following operators [<, <=, >, >=] to indicate 'before', 'before or equal to', 'after' or 'after or equal to' respectively. For example, >2013-12-01T12:00:00Z requests all events updated after Dec. 1, 2015 at 12pm (noon) Coordinated Universal Time. The default is to return events with any update time", "type": "string", "required": false, "default": ">2015-09-01T12:00:00Z" }, { "name": "road_name", "in": "query", "description": "Limits the response to events on a given road as specified by the road name. An example of a valid road name is 'Highway 1'. The default is to return events on all roads.", "type": "string", "required": false, "default": "Highway 99" }, { "name": "area_id", "in": "query", "description": "Limits the response to events within one of the specified areas. An area must be specified as the ID of an item returned by the /areas resource. For example: an area_id of 'drivebc.ca/1' limits events to those within the Lower Mainland District. The default is to return events in all areas.", "type": "string", "required": false, "default": "drivebc.ca/1" }, { "name": "bbox", "in": "query", "description": "Limits the response to events that fall within the specified geographical bounding box. The bbox format must be '[min longitude],[min latitude],[max longitude],[max latitude]' with WGS84 coordinates. For example: -123.45,48.99,-122.45,49.49. The default is to return events in all geographical locations.", "type": "string", "required": false, "default": "-130,48,-116,60" } ], "tags": [ "resources" ], "responses": { "200": { "description": "List of packages" } } } }, "/jurisdiction": { "get": { "summary": "Lists the jurisdictions publishing data through this Open511 API implementation", "parameters": [ { "name": "format", "in": "query", "description": "The format of the response", "type": "string", "required": false, "default": "json", "enum": [ "json", "xml" ] } ], "tags": [ "resources" ], "responses": { "200": { "description": "List of packages" } } } }, "/jurisdictiongeography": { "get": { "summary": "Provides the geographical boundaries for all the jurisdictions.", "parameters": [ { "name": "format", "in": "query", "description": "The format of the response", "type": "string", "required": false, "default": "json", "enum": [ "json", "xml" ] } ], "tags": [ "resources" ], "responses": { "200": { "description": "List of packages" } } } }, "/areas": { "get": { "summary": "Lists the geographical areas (e.g. districts) that can be used to filter events.", "parameters": [ { "name": "format", "in": "query", "description": "The format of the response", "type": "string", "required": false, "default": "json", "enum": [ "json", "xml" ] } ], "tags": [ "resources" ], "responses": { "200": { "description": "List of packages" } } } } } }