-
Notifications
You must be signed in to change notification settings - Fork 72
SIRI Web Service API
This page serves as a single point of entry into information about OneBusAway's developer-facing SIRI Web Service API's.
The best documentation of the SIRI Web Service API as it exists today can be found on the SIRI Introduction page of the MTA Bus Time developer site.
OneBusAway (through the onebusaway-nyc modules) currently supports the following SIRI services:
Both StopMonitoring and VehicleMonitoring capture most of the useful information they include inside the shared MonitoredVehicleJourney element. In addition, the responses to both services are accompanied by relevant service alert information in SituationExchangeDelivery format.
The OBA SIRI API exposes real-time data in SIRI format using a RESTful API that returns data in either XML or JSON format. While those web/mobile-developer friendly tweaks (i.e. RESTful-ness, JSON) were not officially supported as part of the SIRI 1.3 specification, they are part of the SIRI 2.0 specification which has been finalized and is awaiting formal approval by CEN before the end of 2012.
The RoadMap discusses a number of features that are lacking from the SIRI API which is part of the onebusaway-nyc modules. These include:
- inclusion of real-time arrival predictions (NYC's API's and UI's are just showing distance of the bus to the stop)
- inclusion of scheduled arrival times when real-time data is lacking
- inclusion of explicit schedule deviation information
From a purely interface perspective, these can all be accomplished through the (optional/configurable) inclusion of a number of elements in the MonitoredVehicleJourney element (and sub-elements) in the SIRI API as illustrated below (in XML format).
<MonitoredVehicleJourney>
... standard/existing elements of the MonitoredVehicleJourney
<!-- Predicted and scheduled arrival and/or departure times are illustrated here in the context of the MonitoredCall,
but can be included the same way for OnwardCall elements -->
<MonitoredCall>
<!-- To show predicted arrival and/or departure times used Expected[Arrival|Departure]Time-->
<ExpectedArrivalTime>2010-08-24T13:23:15</ExpectedDepartureTime>
<!-- To show scheduled arrival and/or departure times use Aimed[Arrival|Departure]Time-->
<AimedArrivalTime>2010-08-24T13:23:00</AimedArrivalTime>
</MonitoredCall>
<!-- To indicate that the vehicle/trip in question is not actually being tracked
(presumably this is used if you are showing scheduled-only values -->
<Monitored>false</Monitored>
<!-- The bus's deviation from schedule, this is in a weird format per XML conventions -->
<Delay>P0Y0M0DT0H0M15S</Delay>
...
</MonitoredVehicleJourney>