Service Messages
The service messages call returns the current service messages at stops.
Service message responses include the message description and the IDs of the affected routes. Where agencies provide ids of affected routes and stops, the returned messages are filtered for the routes and stops provided in the request. The routes and stops provided in the request are combined. As an example, if route "Red Line" and stop "70053" are provided in the request, and the agency feed provides routes and stops in its service message feed, then the messages returned are the messages that affect the route "Red Line" and the messages that affect the stop "70053".
Call format
Part | Description | Optional | Example |
URL | TransiCast web server instance URL | http://transicast.appspot.com/ws/V3 | |
Servlet descriptor | detours | detours | |
Parameter: agency=<agency id> | Agency ID, as provided by the agencies call | agency=WMATA | |
Parameter: locIDs=<stop id, ... > | Comma separated list of stop IDs, as provided by the stops call | locIDs=5017 | |
Parameter: routes=<route id, ... > | Comma separated list of Route IDs, as provided by the route list call | route=28 |
http://transicast.appspot.com/ws/V3/detours?agency=WMATA&locIDs=5017&routes=Yellow&appid=<api_key>
Response format
Individual messages are returned through the <detour> tag. It contains the following attributes:
Attribute | Description | Key | Used in | Example |
id | Agency provided message ID | id="23184" | ||
desc | Message description | desc="Street closure, Stop ID 7751 on SW 6th at Burnside will not be served." | ||
fulldesc | Long description | fulldesc="Due to a street closure, Stop ID 7751 on SW 6th at Burnside will not be served. A temporary stop is located on NW Broadway between Couch and Davis." | ||
phonetic | Text-to-speech friendly message description | phonetic="Due to a street closure, Stop ID 7751 on SW 6th at Burnside will not be served. A temporary stop is located on NW Broadway between Kooch and Davis." | ||
period | Tag: Validity period, see below | |||
route | Tag: Affected route, see below |
Where provided by the agency, each message contains <period> tags which identify the valid times of the message. It contains the following attributes:
Attribute | Description | Key | Used in | Example |
begin | Begin time | begin="1366062420000" | ||
end | End time | end="2123226000000" |
In addition, where provided by the agency, each message contains <route> tags which identify the affected routes by route ID. It contains the following attributes:
Attribute | Description | Key | Used in | Example |
route | Route ID | Route list, as key value | route="35" |
<?xml version="1.0" encoding="UTF-8"?> <resultSet queryTime="1319389595177" ct="4"> <detour desc="Blue Line: Trains are single tracking btwn Stadium-Armory & Addison Rd due to scheduled track maintenance. Expect delays in both directions."> <route route="Blue"/></detour> <detour desc="Red Line: Thru closing Sun. Oct. 23rd, buses replace trains btwn Ft. Totten and N.Y. Ave. stations. Shuttle svc is provided."> <route route="Red"/></detour> <detour desc="Red Line: Thru closing Sun. Oct. 23rd, Rhode Island Ave & Brookland stations are closed for track maintenance. Shuttle svc is provided."> <route route="Red"/></detour> <detour desc="Green Line: Trains are single tracking btwn Fort Totten & PG Plaza due to scheduled track maintenance. Expect delays in both directions."> <route route="Green"/></detour> </resultSet>
In addition to the structured service messages, links to the service messages of the agency's customer facing web site might be provided. The links are provided through the <ersatzLink> tag.
<?xml version="1.0" encoding="UTF-8"?> <resultSet queryTime="1341460335052" ct="0"> <ersatzLink>http://www.psta.net/RiderAlert.htm</ersatzLink> </resultSet>
Notes
- At this time, only TriMet (Portland) provides content for phonetic
- Not all original feeds support routes as a request parameter for service messages. In the aggregate, TransiCast does not require the routes parameter. As original feeds may not need this parameter, and return service messages for all routes, TransiCast directly returns the content of the original feed, including service messages for routes that may not have been requested in the call. It is recommended to include the routes parameter, as some original feeds return error messages or no content, when routes are not provided as part of their calls
Contact
By email  
© 2011 - 2023 TransiCast |