OneBusAway Documentation

website·Indexed 29 days ago

https://onebusaway-docs.onrender.com

Documentation for the OneBusAway transit data platform, including RESTful API references, GTFS-Realtime export APIs, and configuration guides for v1.x and v2.x. Includes developer guides for building and deploying application modules, transit data bundle creation, and command-line utilities for GTFS transformation, merging, and Hibernate loading.

Tokens
62.7K
Snippets
278
Records
369
Agent score
49%

What's inside OneBusAway

  1. Overview of OBACloud Push Notification Features

    OBACloud provides three primary push-driven features using the same APNs device token. All endpoints are unauthenticated, and ownership is determined by possession of the APNs token or the specific resource URL. All features are region-scoped; if a region has no sidecar URL, push features are unavailable.

    FeatureTriggerToken AssociationNotification Type
    Trip alarmsRider-defined (e.g., 10 mins before arrival)Attached to alarm at creation via user_push_idAlert + custom arrival_and_departure payload
    Live ActivitiesServer-pushed updates to Lock ScreenAttached to activity at creation via push_tokenActivityKit content updates (no user alert)
    Service alertsTransit agency publishing an alertProactive device registration via /push_registrationsPlain alert (title + body)
  2. Overview of OneBusAway iOS Inbound URL Mechanisms

    The OneBusAway iOS app (OBAKit) handles inbound navigation through four primary mechanisms. Most flow through SceneDelegate to the Application class.

    MechanismTransportHandler
    Custom URL schemeonebusaway://...URLSchemeRouter $\rightarrow$ Application.application(_:open:options:)
    Universal Linkshttps://... (associated domain)AppLinksRouter $\rightarrow$ Application.application(_:continue:restorationHandler:)
    NSUserActivityactivity type + userInfoAppLinksRouter.route(userActivity:)
    Alarm push notificationsAPNs payload (AlarmPushBody)Application.pushService(_:received:)

    Important Caveat: Scene callbacks (scene:openURLContexts: and scene:continueUserActivity:) discard their return values. If a URL is unmatched, it is silently dropped inside the app; there is no fallback to Safari for Universal Links once the app has claimed the domain.

  3. Overview of OneBusAway Search API

    OneBusAway provides a Search API designed to power autocomplete controls. The API follows standard RESTful conventions and was introduced in release 2.2.2. It currently supports searching for stops and routes.
  4. Overview of OneBusAway transit information tools

    OneBusAway is a suite of open-source transit information tools designed for transit agencies to provide real-time vehicle locations, alerts, and arrival information to riders. The ecosystem includes iOS and Android applications, a web platform, robust APIs, and back-office support tools.
  5. Overview of OneBusAway application modules

    OneBusAway is a transit-data framework that processes raw transit data (such as GTFS and GTFS-realtime) into optimized data bundles to power several rider-facing interfaces:

    • OneBusAway Web: Provides standard, mobile-optimized, and text-only web interfaces with maps and real-time stop information.
    • OneBusAway REST API: A RESTful web service used to build third-party applications and powers the official iOS and Android apps.
    • OneBusAway Phone: An Interactive Voice Response (IVR) system for real-time transit info.
    • OneBusAway SMS: An SMS-based service for real-time transit info.
    • OneBusAway Sign Mode: An interface optimized for large public displays.
  6. Overview of onebusaway-gtfs-modules

    The onebusaway-gtfs-modules is a Java library for reading and writing GTFS feeds. It is composed of several specialized modules:

    • onebusaway-gtfs: Core library for reading and writing GTFS.
    • onebusaway-gtfs-hibernate: Support for Hibernate database persistence of GTFS data.
    • onebusaway-gtfs-hibernate-cli: CLI utility for loading GTFS feeds into a database.
    • onebusaway-gtfs-transformer: Tools for transforming GTFS data.
    • onebusaway-gtfs-transformer-cli: CLI utility for transforming GTFS.
    • onebusaway-gtfs-merge: Tools for merging GTFS data.
    • onebusaway-gtfs-merge-cli: CLI utility for merging GTFS feeds.
  7. Retrieve block details using the block Method

    The block method is used to retrieve detailed information about a specific transit block by its ID. The response provides a comprehensive view of the block, including its configuration, associated trips, and specific stop times. Key data points returned include tripId, accumulatedSlackTime, and a list of blockStopTimes which contains the sequence of stops, distance along the block, and arrival/departure times for each stop.
    // Example of the structure found in the block response
    {
      "tripId": "1_562536525",
      "accumulatedSlackTime": 720,
      "distanceAlongBlock": 15420.662716076942,
      "blockStopTimes": [
        {
          "accumulatedSlackTime": 720.0,
          "blockSequence": 47,
          "distanceAlongBlock": 15420.662716076942,
          "stopTime": {
            "arrivalTime": 19500,
            "departureTime": 19500,
            "dropOffType": 0,
            "pickupType": 0,
            "stopId": "1_18085"
          }
        }
      ]
    }
  8. Use the vehicleStatus element to track real-time vehicle data

    The <vehicleStatus/> element provides extended real-time information about an active transit vehicle. It includes the vehicle's unique identifier, timing of the last updates, current geographic coordinates, and its association with a specific trip. Note that a vehicle may not always have an actively assigned trip.
    <vehicleStatus>
      <vehicleId>1_244</vehicleId>
      <lastUpdateTime>1365194918000</lastUpdateTime>
      <lastLocationUpdateTime>1365194918000</lastLocationUpdateTime>
      <location>
        <lat>47.238071</lat>
        <lon>-122.293922</lon>
      </location>
      <tripId>3_4989224-13FEB-MVS-WKD-Weekday-04</tripId>
      <tripStatus>...</tripStatus>
    </vehicleStatus>
  9. Use official OneBusAway SDKs for REST API integration

    OneBusAway provides official SDKs built from an OpenAPI specification via StainlessAPI. These SDKs allow developers to integrate with the REST API using native language patterns. If you encounter a bug unique to a specific language implementation, report it via that SDK's respective issue tracker.
  10. Retrieve extended trip information using the trip-details method

    The trip-details method retrieves detailed information about a specific trip, including its schedule and current status (e.g., whether it is scheduled or canceled). The trip ID is passed directly as a path parameter in the URL.
    GET http://api.pugetsound.onebusaway.org/api/where/trip-details/[TRIP_ID].xml
  11. Retrieve details for a specific trip by ID

    Use the trip method to get detailed information about a specific trip. The trip ID is passed as a path parameter directly in the URL. The API supports multiple response formats (e.g., .json, .xml).
    GET https://api.pugetsound.onebusaway.org/api/where/trip/1_605425455.json?key=TEST