Sound Transit System API

System utilities and configuration

OpenAPI Specification

sound-transit-system-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Sound Transit OneBusAway Agencies System API
  description: The Sound Transit OneBusAway API provides access to real-time and scheduled transit data for the Puget Sound region including routes, stops, arrivals, departures, and vehicle positions. Supports real-time data for the 1 Line, 2 Line, T Line, and ST Express bus routes.
  version: '2.0'
  contact:
    name: Sound Transit Open Transit Data
    email: open_transit_data@soundtransit.org
    url: https://www.soundtransit.org/help-contacts/business-information/open-transit-data-otd
  license:
    name: Open Data
    url: https://www.soundtransit.org/help-contacts/business-information/open-transit-data-otd/transit-data-terms-use
servers:
- url: https://api.pugetsound.onebusaway.org/api/where
  description: Puget Sound OneBusAway API
tags:
- name: System
  description: System utilities and configuration
paths:
  /current-time.json:
    get:
      operationId: getCurrentTime
      summary: Get Current Time
      description: Retrieve the current server time.
      tags:
      - System
      parameters:
      - $ref: '#/components/parameters/ApiKey'
      responses:
        '200':
          description: Current server time
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CurrentTimeResponse'
  /config.json:
    get:
      operationId: getConfig
      summary: Get Server Configuration
      description: Get server deployment configuration details.
      tags:
      - System
      parameters:
      - $ref: '#/components/parameters/ApiKey'
      responses:
        '200':
          description: Server configuration
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConfigResponse'
components:
  parameters:
    ApiKey:
      name: key
      in: query
      required: true
      description: API key obtained from Sound Transit (contact oba_api_key@soundtransit.org)
      schema:
        type: string
  schemas:
    CurrentTimeResponse:
      allOf:
      - $ref: '#/components/schemas/BaseResponse'
      - type: object
        properties:
          data:
            type: object
            properties:
              entry:
                type: object
                properties:
                  time:
                    type: integer
                    format: int64
                  readableTime:
                    type: string
    ConfigResponse:
      allOf:
      - $ref: '#/components/schemas/BaseResponse'
      - type: object
        properties:
          data:
            type: object
    BaseResponse:
      type: object
      properties:
        code:
          type: integer
          description: HTTP status code
        currentTime:
          type: integer
          format: int64
          description: Current server time in milliseconds
        text:
          type: string
          description: Human-readable status message
        version:
          type: integer
          description: API version