Skip navigation

Alerts web service

Base HTTP URL: http://developer.trimet.org/ws/v2/alerts
Base HTTPS URL: https://developer.trimet.org/ws/v2/alerts

Request parameters:

Name Value Description
routes comma delimited list of route numbers (optional) If present results will be filtered to the alerts applicable for the route numbers provided. If this and locIDs is ommitted every alert in effect will be returned. locIDs and routes can be used at the same time and are inclusive.
route alias for routes (optional) Same as routes.
locIDs comma delimited list of location IDs (optional) If present results will be filtered to the alerts applicable for the location IDs provided. If this and routes is ommitted every alert in effect will be returned. locIDs and routes can be used at the same time and are inclusive.
appID string (required) Your appID received during registration.
systemWideOnly boolean (optional) "true" or "false" (default) If true only alerts to be shown for the entire system are included ( alert[@system_wide_flag] will be true ). Parameters routes and locIds will be ignored.
json boolean (optional) "true" (default) or "false" If true results will be returned in json format rather than xml format.
callback string (optional) If present returns the json result in a jsonp callback function. Only used if json is set to true.


Response fields:
note: all times values are in Unix time format, milliseconds since epoch.

Name Description
resultSet Root element of all results
errorMessage This element will occur if there was an error processing your request and will contain a description of the problem.
alert Contains information about an alert.
alert[@begin] Time the alert takes effect.
alert[@end] The time the alert will no longer be in effect. May be null, in which case the end time is unknown.
alert[@desc] A plain text description of the alert.
alert[@header_text] Nullable field contains short text description of alert/detour suitable for a header field.
alert[@id] A unique identifier of the alert.
alert[@info_link_url] Contains a url where more information can be found about the alert. Will be null if not available.
alert[@system_wide_flag] Indicates this alert is a general message for the entire TriMet system.
route Child elements of an alert element contains information about a route the alert is applicable to.
route[@id] This route's unique identifier (an integer).
route[@desc] The description of the route number.
route[@route] The route's number (an integer). Will be the same as route[@id].
route[@type] The type of the route, either 'B' for bus, or 'R' for fixed guideway (either rail or aerial tram).
route[@no_service_flag] Boolean value indicates if service is canceled for this route.
location Child elements of an alert element contain information about a location, usually a stop, the alert is applicable to.
location[@desc] The public location description of the stop.
location[@dir] The direction of traffic at the stop.
location[@lat] The latitude of the stop.
location[@lng] The longitude of the stop.
location[@id] Unique id for location. Location ID or stopID of the stop.
location[@passengerCode] Passenger access code for the stop.
'E' = Either boarding or alighting
'A' = Alighting only
'B' = Boarding only
'N' = Neither boarding nor alighting
location[@no_service_flag] Boolean value indicates if service is canceled for this location.