TransiCast / Rasa - API Documentation
The TransiCast / Rasa REST API breaks down into six calls:
agency list,
stops,
route list,
route details,
next bus and train times and
service messages. The REST API of TransiCast / Rasa is XML based, and uses exclusively REST GET method calls. This should make it easy to implement client side calls. There is no JSON implementation of TransiCast / Rasa at this time.
| For test purposes, please feel free to use the test application ID appid=sample522are9 and calls to the general TransiCast transit data server at (http://transicast.appspot.com/ws/V1). This opens all API calls, and the transit data loaded on the general TransiCast transit data server. User facing release of your product or service requires an application ID on a TransiCast / Rasa production plan. Separate transit data licensing requirements of transit agencies may also apply. Please contact us for more information. |
General call format
The general call format of API calls consists of four parts:
- • TransiCast / Rasa web server address: http://<yourapp>.appspot.com/ws/V1
- • The identifier of the servlet of an API call
- • Required and optional query parameters such as WGS-84 coordinates (lat/lon), stop numbers and route numbers
- • appid license key issued by TransiCast
http://transicast.appspot.com/ws/V1/agencies?ll=41.727122,-87.55947&appid=sample4
General response format
The responses of the TransiCast / Rasa REST API are in XML. They are wrapped in a <ResultSet> tag which contains the following two attributes:
- • queryTime: Server time of the query
- • ct: Number of records returned by the call
As an example, the sample call above may return the following response:
<?xml version="1.0" encoding="UTF-8"> <resultSet queryTime="1319328820274" ct="2"> <agency id="1033008" common="Chicago" name="CTA" rt="true" top="42.083153" left="-87.9142231" bottom="41.6341576" right="-87.5156995"/> <agency id="1027005" name="Pace" top="42.4674811" left="-88.62845" bottom="41.3805003" right="-87.3457901"/> </resultSet>
TransiCast / Rasa uses the following formats and encodings:
- • Coordinates are WGS-84 decimal values
- • Times are in elapsed milliseconds since midnight, January 1, 1970 UTC
- • Special characters contained in result strings are HTML encoded
- • Colors are RGB encoded, with hexadecimal values
Error handling
TransiCast returns errors in XML, using the error tag to provide a description of the error. As an example, the following call is not well formatted, and will trigger a data format error:
http://transicast.appspot.com/ws/V1/stops?&&max=4&appid=sample522are9&meters=1300&ll=%5Bapp:user-lat%5D,%5Bapp:user-lon%5D
Contact
By email  
| © 2011, 2012 Joachim Pfeiffer |
|
