---
title: "Dummy Websocket Endpoint"
method: GET
path: "/ws/{agency_id}/{endpoint}/{route_codes}"
tags: ["Real-Time data"]
---

# Dummy Websocket Endpoint

`GET /ws/{agency_id}/{endpoint}/{route_codes}`

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"

## Path parameters

- `agency_id` string, required
- `endpoint` string, required
- `route_codes` string, nullable, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/metro/apis/fastapi.md) · [All operations](https://skmtc.net/metro/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/metro/fastapi/revisions/ebd5ca4c3b67/schema)
