Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Tampa Third Party App Interfaces

Sean Barbeau edited this page Aug 20, 2013 · 8 revisions

The following two sections discuss the details of real-time transit information interfaces provided by the software behind the OneBusAway Tampa deployment.

GTFS-realtime feed

A GTFS-realtime contains a snapshot of the real-time status of the entire system. Typically, this interface is used by other servers to retrieve data for all routes and buses. See the GTFS-realtime spec for more documentation on the GTFS-realtime format.

We offer two types of GTFS-realtime feeds for HART data:

  1. Trip Updates Feed
  • Applications should access this feed at the URL http://oba.gohart.org:8088/trip-updates to retrieve the file in Protocol Buffer format, which is the default GTFS-realtime format that would be consumed by applications.
  • A plain-text version can be seen at http://oba.gohart.org:8088/trip-updates?debug, for debugging purposes only (should NOT be used by apps).
  1. Vehicle Positions Feed
  • Applications should access this feed at the URL http://oba.gohart.org:8088/vehicle-positions to retrieve the file in Protocol Buffer format, which is the default GTFS-realtime format that would be consumed by applications.
  • A plain-text version can be seen at http://oba.gohart.org:8088/vehicle-positions?debug, for debugging purposes only (should NOT be used by apps).

See more details on the Tampa GTFS-realtime feed implementation on the project wiki.

OneBusAway REST Application Programming Interface (API)

The OBA REST API is used to retrieve targeted real-time information for a specific bus stop or route. Typically this interface is used by mobile apps to retrieve information about a specific bus stop or route that the mobile app user has requested.

See the OBA REST API documentation for more information.

Before mobile apps can use this interface, they must request a API key from the Tampa OneBusAway administrators. See the OBA Tampa API Service page for information on how to request an API key.

The base URL for the Tampa REST API is:

http://onebusaway.forest.usf.edu/api/

We recommend you use the JSON format for API responses, instead of XML.

An example request to retrieve all transit agencies that this OBA instance covers formatted via JSON is:

http://onebusaway.forest.usf.edu/api/api/where/agencies-with-coverage.json?key=ADD_YOUR_KEY_HERE

...where ADD_YOUR_KEY_HERE is replaced by the API key you receive from OBA Tampa administrators.

An example request to retrieve estimated arrival information for bus stop ID 3105 formatted via JSON is:

http://oba.gohart.org/api/api/where/arrivals-and-departures-for-stop/Hillsborough%20Area%20Regional%20Transit_3105.json?key=ADD_YOUR_KEY_HERE

...where ADD_YOUR_KEY_HERE is replaced by the API key you receive from OBA Tampa administrators.

HART GTFS data

All IDs (tripIDs, stopIDs, etc.) for the above real-time data match with HART's static GTFS data. You can download HART's GTFS data from a link on HART's Developer Page. Check out the GTFS Reference page for more info on GTFS format.