v1

latestOpenAPI 3.1.02026-07-13311222.4 KB
Real-Time data

Dummy Websocket Endpoint

Dummy HTTP endpoint for WebSocket documentation.

This endpoint is used for documentation purposes only. It mirrors the WebSocket endpoint that accepts connections and sends real-time updates about vehicles and trips.

Args: agency_id (str): The ID of the agency. endpoint (str): The type of updates to send. Can be "vehicle_positions" or "trip_updates". route_codes (str, optional): A comma-separated list of route codes to filter updates. If not provided, updates for all routes are sent.

The WebSocket endpoint sends updates in the following format:

{ "id": "vehicle_id", "vehicle": { "trip": { "route_id": "route_code", ... }, ... }, "route_code": "route_code", ... }

The WebSocket endpoint sends updates every 3 seconds. If an error occurs while processing updates, the WebSocket endpoint sends an error message in the following format:

"Error: error_message"

get/ws/{agency_id}/{endpoint}/{route_codes}

Path parameters

agency_idstring required
endpointstring required
route_codesstring nullable required

Response

Successful Response

{"stackTrail":"paths:/ws/{agency_id}/{endpoint}/{route_codes}:get:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}