Chuyển đến nội dung chính

Báo cáo sự cố

Trang này không nói về một trạm dừng, tuyến, ga hay xe cụ thể. Hãy mở một mục để báo cáo nêu tên mục đó, hoặc dùng báo cáo đầy đủ.

Chuyện gì đã xảy ra
Báo cáo đầy đủ Không cần tài khoản
Dữ liệu và bằng chứng
  1. Bài đọc
  2. Dữ liệu và bằng chứng
  3. API cho nhà phát triển

Mọi số liệu trên trang này đều lấy được bằng một lệnh gọi JSON miễn phí.API cho nhà phát triển

Every figure here is versioned JSON. Free to use, with or without a key.Every figure here is versioned JSON. Free to use, with or without a key.

Free, key optional · 1,000 a day, 60 a minute · code MIT · version 1.0.0

Truy cập

Free

key optional

Giới hạn tốc độ

1,000 a day

60 a minute; more on Developer

Giấy phép mã nguồn

MIT

dữ liệu giữ nguyên điều khoản của nguồn

Phiên bản

1.0.0

stable · 180 days’ notice

Plans

Free

1,000 calls a day, 60 a minute. No key needed; a free key counts your calls separately from everyone else on your network.

Credit ‘Data: OTranspo (otranspo.ca)’ wherever you show the data.

Developer

$10 a monthor $100 a year (CAD)

  • 100,000 calls a day, 600 a minute
  • Bulk downloads and full history
  • Support by email

Journalists, students and council staff: the free tier is yours. Write to us if you need more for a story or a study.

How to send a key

curl -H "Authorization: Bearer otr_…" https://otranspo.ca/api/public/v1/route-states

Giới hạn

Each answer carries X-RateLimit-Remaining (this minute) and X-RateLimit-Daily-Remaining (today, UTC). Over the limit you get 429 with the time it resets.

Một lệnh gọi, từ đầu đến cuối

Yêu cầu

curl https://otranspo.ca/api/public/v1/route-states

Phản hồi này là phản hồi thật từ trang web này. Hệ thống lấy phản hồi khi bạn yêu cầu.

Phản hồi, rút gọn Lược đồ

Đang chạy…

Mọi tài nguyên, 39

Đường dẫn bắt đầu bằng /api/public/v1 nếu không được viết đầy đủ. Mở bất kỳ hàng nào để xem mã trạng thái HTTP, mã lỗi, quyền truy cập, độ không chắc chắn và lược đồ.

Mục lục và quy ướcbắt đầu từ đây2
Danh mục APIGET/api/public/v1—JSON

Mã trạng thái HTTP

200

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

endpoints.id · endpoints.path

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1

JSON Schema

Hợp đồng OpenAPI 3.1GET/openapi.json—JSON

Mã trạng thái HTTP

200

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

operationId · path

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/openapi.json

JSON Schema

Dịch vụ hiện tạiđiều đang diễn ra ngay phút này5
Các chuyến bị hủy đang được thông báoGET/current-cancellations—JSON

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

unsupported_query 400 · current_cancellations_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

trips.tripId · trips.routeId

Nguồn và mức độ không chắc chắn

Only explicit CANCELED/DELETED notices for timetable trips in the current snapshot are listed. Empty or unavailable feeds do not prove that no trips were cancelled; outside-timetable notices may be withheld.

Ví dụ gọi API

GET /api/public/v1/current-cancellations

JSON Schema

Trạng thái tuyến: theo lịch và thực tế quan sátGET/route-states—JSON

Mã trạng thái HTTP

200 · 503

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

operatorId · routeId

Nguồn và mức độ không chắc chắn

This is not an operator alert. Routes without published positions use positions_not_published; stale or missing feeds return unavailable.

Ví dụ gọi API

GET /api/public/v1/route-states

JSON Schema

Sự cố, bằng tiếng Anh và tiếng PhápGET/incidents—JSON

Mã trạng thái HTTP

200 · 503

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

publicId · slug · updates.id

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/incidents

JSON Schema

Một cảnh báo chính thứcGET/alerts/{alertId}format=json|csv · alertIdJSON · CSV

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

invalid_alert_id 400 · unsupported_format 400 · alert_not_found 400 · alert_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

alert.id · alert.operatorId

Nguồn và mức độ không chắc chắn

The notice is the operator’s own wording. Kept wordings start when we first saw the notice, not when the operator posted it, and an empty list does not prove the notice never changed.

Ví dụ gọi API

GET /api/public/v1/alerts/{alertId}

JSON Schema

Bảng giờ tại trạmGET/stations/{stationId}format=json|csv · stationIdJSON

Mã trạng thái HTTP

200 · 400 · 404 · 503

Mã lý do lỗi

invalid_station_id 400 · unsupported_format 400 · station_not_found 404 · station_board_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

station.id · lines.routeRecordId · departures.tripId

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/stations/{stationId}

JSON Schema

Dữ liệu probantes và báo cáocác số liệu đằng sau mọi trang11
Dữ liệu về độ tin cậyGET/reliability-evidenceformat=json|csvJSON · CSV

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

unsupported_format 400

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

routeId · window

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/reliability-evidence

JSON Schema

Dữ liệu về tuyếnGET/routes/{routeId}/evidenceformat=json|csv · routeIdJSON

Mã trạng thái HTTP

200 · 400 · 404 · 503

Mã lý do lỗi

invalid_route_id 400 · unsupported_format 400 · route_not_found 404 · route_evidence_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

route.routeId

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/routes/{routeId}/evidence

JSON Schema

Route 7 evidence on the site

Dịch vụ của tuyến theo ngàyGET/routes/{routeId}/service-evidencewindow=day|week|month|28d · date · format=json|csv · routeIdJSON

Mã trạng thái HTTP

200 · 400 · 404 · 503

Mã lý do lỗi

invalid_route_id 400 · unsupported_window 400 · invalid_service_date 400 · unsupported_format 400 · route_not_found 404 · route_service_evidence_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

routeId · window

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/routes/{routeId}/service-evidence

JSON Schema

Dịch vụ theo ga hoặc khu vực bầu cửGET/places/{kind}/{placeId}/service-evidencedate · kind=station|ward · placeIdJSON

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

unsupported_place_kind 400 · invalid_place_id 400 · unsupported_query 400 · invalid_service_date 400 · place_service_evidence_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

kind · placeId · operatorId

Nguồn và mức độ không chắc chắn

Observation and cancellation completeness are explicitly unverified; no-position candidate counts remain null and comparison eligibility is false.

Ví dụ gọi API

GET /api/public/v1/places/{kind}/{placeId}/service-evidence

JSON Schema

Tải về hồ sơ dữ liệu probantesGET/evidence/{evidenceId}format=json|csv · evidenceIdJSON · CSV

Mã trạng thái HTTP

200 · 400 · 404

Mã lý do lỗi

unsupported_format 400 · not_found 404

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

evidenceId

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/evidence/{evidenceId}

JSON Schema

Bảng điểm theo quậnGET/ward-scorecardsformat=json|csvJSON · CSV

Mã trạng thái HTTP

200 · 503

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

snapshotId · wardId

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/ward-scorecards

JSON Schema

Các bản bảng điểm trước đâyGET/historical-scorecardssnapshotId=historical-scorecards:<sha256> · routeIdJSON

Mã trạng thái HTTP

200 · 400 · 404 · 422

Mã lý do lỗi

snapshot_id_required 400 · invalid_route_id 400 · invalid_parameters 400 · snapshot_not_found 404 · route_detail_not_published 422 · route_not_in_snapshot 404

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

snapshotId · routeId

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/historical-scorecards

JSON Schema

Kho lưu trữ báo cáo dịch vụGET/service-report-archivekindJSON

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

invalid_archive_query 400 · archive_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

kind · period

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/service-report-archive

JSON Schema

Độ chính xác của dự đoánGET/prediction-calibration—JSON

Mã trạng thái HTTP

200 · 503

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

operatorId · routeId · routeContext · horizonBucket

Nguồn và mức độ không chắc chắn

Later observed arrival is a comparison, not ground truth or a validated prediction interval; independent validation is false.

Ví dụ gọi API

GET /api/public/v1/prediction-calibration

JSON Schema

Báo cáo dịch vụ đã chọnGET/api/insights/reports/selected?period={period}&date={YYYY-MM-DD}period=day|week|month · date=YYYY-MM-DD · operator=all|oc_transpo|sto · routeJSON

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

invalid_selection 400 · selected_report_unavailable 503 · invalid_route_hour_selection 400 · route_hours_unavailable 503

Truy cập và giới hạn tốc độ

Ẩn danh; không có giới hạn public-api nào được thiết lập cho đường dẫn này.

Mã định danh ổn định

period · date · operator · method

Nguồn và mức độ không chắc chắn

Without route, the selected-report contract is unchanged. With route, the selected-route-hours contract returns at most48 method-separated local-hour prediction groups, preserving requested report operator separately from routeOperator. These mutable retained predictions do not prove physical arrivals, complete archive coverage, zero service or an immutable publication.

Ví dụ gọi API

GET /api/insights/reports/selected?period={period}&date={YYYY-MM-DD}

JSON Schema

Dữ liệu đầu vào để so sánh dự đoánGET/api/insights/reports/selected/comparison-evidence?period={period}&date={YYYY-MM-DD}period=day|week|month · date=YYYY-MM-DD · operator=all|oc_transpo|stoJSON

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

invalid_comparison_evidence_selection 400

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

payload.edition · payload.selection · checksum.value

Nguồn và mức độ không chắc chắn

This opt-in export preserves the exact captured route/day read results, declared calendar, comparison refusals and measured source-code manifest. It is bounded to 20,000 input rows and 8 MiB and does not claim an atomic database snapshot, statistical independence, confidence intervals, physical service delivery, causation, equivalence or model eligibility. Schema validation alone does not verify checksum or replay; consumers must perform those checks separately.

Ví dụ gọi API

GET /api/insights/reports/selected/comparison-evidence?period={period}&date={YYYY-MM-DD}

JSON Schema

Lịch sử và phát lạinhững gì đã xảy ra6
Các chuyến bị hủy và các khoảng trống trước đâyGET/historical-cancellationswindow=day|week|28d|month · date · assessment=noneJSON

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

unsupported_query 400 · unsupported_window 400 · invalid_service_date 400 · unsupported_assessment 400 · historical_cancellations_unavailable 503 · historical_cancellation_limit_exceeded 400

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

period · records.tripId

Nguồn và mức độ không chắc chắn

Historical polling completeness is unverified and schedule matching may be unassessed; unknown coverage is not zero cancellations.

Ví dụ gọi API

GET /api/public/v1/historical-cancellations

JSON Schema

Xem lại thành phốGET/replaydate · routeFamily · operator · fromMinute · minutes · summaryJSON

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

date_required 400 · invalid_route_family 400 · invalid_operator 400 · replay_positions_unavailable 503 · published_replay_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

date · routeFamily · operator

Nguồn và mức độ không chắc chắn

Replay is historical and never live; only captured/published archive evidence is returned.

Ví dụ gọi API

GET /api/public/v1/replay

JSON Schema

Xe quan sát được, theo ngàyGET/fleet-historydate · operator=all|oc_transpo|sto · route · feedIdJSON

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

invalid_fleet_history_lookup 400 · invalid_fleet_history_date 400 · invalid_fleet_history_operator 400 · fleet_history_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

serviceDate · operator · route

Nguồn và mức độ không chắc chắn

Retained feed observations are not a physical fleet inventory; missing retention is not zero service.

Ví dụ gọi API

GET /api/public/v1/fleet-history

JSON Schema

Mã xe trong nguồn dữ liệu, theo ngàyGET/fleet-history/feed-idsdate · operator=all|oc_transpo|sto · cursorJSON

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

invalid_fleet_feed_id_selection 400 · invalid_fleet_history_date 400 · invalid_fleet_history_operator 400 · invalid_fleet_feed_id_cursor 400 · fleet_feed_id_census_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

date · operator · digest · collisionOrdinal

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/fleet-history/feed-ids

JSON Schema

Một mã phương tiện theo thời gianGET/vehicles/{vehicleId}/visibility-historyformat=json|csv · vehicleIdJSON

Mã trạng thái HTTP

200 · 400 · 404 · 503

Mã lý do lỗi

invalid_vehicle_id 400 · unsupported_format 400 · vehicle_history_unavailable 503 · vehicle_history_not_found 404

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

vehicleId

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/vehicles/{vehicleId}/visibility-history

JSON Schema

Vehicles seen, in bulkGET/bulk/fleet-historyfrom · to · operator=all|oc_transpo|sto · route · feedIdJSON

Mã trạng thái HTTP

200 · 400 · 401 · 403 · 429 · 503

Mã lý do lỗi

unsupported_query 400 · invalid_bulk_range 400 · invalid_fleet_history_lookup 400 · invalid_fleet_history_operator 400 · fleet_history_unavailable 503 · api_key_required 401 · invalid_api_key 401 · plan_required 403 · rate_limited 429

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

serviceDate · operator · route

Nguồn và mức độ không chắc chắn

Each line is the fleet-history evidence for one seven-day window; retained feed observations are not a physical fleet inventory and missing retention is not zero service.

Ví dụ gọi API

GET /api/public/v1/bulk/fleet-history

JSON Schema

Lịch trình và dùng ngoại tuyếnlịch trình đã công bố6
Lịch chạy của một tuyếnGET/transit-planning/{routeId}date · routeIdJSON

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

invalid_route_or_date 400 · use_history_for_past_dates 400 · planning_baseline_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

routeId · serviceDate

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/transit-planning/{routeId}

JSON Schema

Lịch trình của toàn mạng lướiGET/transit-planning/networkdateJSON

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

invalid_parameters 400 · invalid_service_date 400 · network_baseline_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

serviceDate

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/transit-planning/network

JSON Schema

Đường phố giữa hai điểmPOST/transit-planning/street-pathbodyJSON

Mã trạng thái HTTP

200 · 400 · 503

Mã lý do lỗi

invalid_body 400 · invalid_segment 400

Truy cập và giới hạn tốc độ

Ẩn danh, cần nguồn gốc đáng tin cậy; 60 lần mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

from · to

Nguồn và mức độ không chắc chắn

Path may be unavailable when routing source data is absent; no path is not evidence of no accessible route.

Ví dụ gọi API

POST /api/public/v1/transit-planning/street-path

JSON Schema

Gói lịch trình dùng ngoại tuyếnGET/offline-pack—JSON

Mã trạng thái HTTP

200 · 503

Mã lý do lỗi

offline_pack_not_published 503 · offline_pack_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

packId · digest

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/offline-pack

JSON Schema

Danh mục gói ngoại tuyếnGET/offline-pack/manifestpackJSON

Mã trạng thái HTTP

200 · 404 · 503

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

packId · shards.id

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/offline-pack/manifest

JSON Schema

Phần của gói ngoại tuyếnGET/offline-pack/shards/{id}idbytes

Mã trạng thái HTTP

200 · 404 · 503

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

id · digest

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/offline-pack/shards/{id}

JSON Schema

Sổ đăng ký và chính sáchnhững gì chúng tôi đã thay đổi và lý do6
Sổ hiệu chỉnhGET/correctionsformat=json|csvJSON · CSV

Mã trạng thái HTTP

200 · 400

Mã lý do lỗi

unsupported_format 400

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

records.id · records.revision

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/corrections

JSON Schema

Sổ đăng ký chính sáchGET/policy-register—JSON

Mã trạng thái HTTP

200

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

records.id · records.revision

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/policy-register

JSON Schema

Bảo đảm khả năng tiếp cậnGET/accessibility-assurance—JSON

Mã trạng thái HTTP

200

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

evidence.id · remediationLog.id

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/accessibility-assurance

JSON Schema

Phạm vi khu vực và độ mới của dữ liệuGET/regional-coverage—JSON

Mã trạng thái HTTP

200 · 503

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

operators.operatorId

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/regional-coverage

JSON Schema

Kênh thông báo và trợ giúpGET/journey-service-policy—JSON

Mã trạng thái HTTP

200

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

contractVersion · channels.channel

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/journey-service-policy

JSON Schema

Kiểm tra hiển thị phương tiệnGET/fleet-presentation—JSON

Mã trạng thái HTTP

200 · 503

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

evidence.operatorSamples.operatorId

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/fleet-presentation

JSON Schema

Chia sẻliên kết và thẻ mạng xã hội3
Tạo liên kết chia sẻPOST/share-snapshotsbodyJSON

Mã trạng thái HTTP

200 · 400 · 404 · 409 · 503

Mã lý do lỗi

Invalid request body. 400 · A canonical public path is required. 400 · This page cannot be shared as a public snapshot. 400 · The public page was not found. 404

Truy cập và giới hạn tốc độ

Ẩn danh, cần nguồn gốc đáng tin cậy; 60 lần mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

snapshotId · revision

Nguồn và mức độ không chắc chắn

If immutable evidence is not published, issuance returns a canonical_only state; retryable storage faults return a human-readable error and 503.

Ví dụ gọi API

POST /api/public/v1/share-snapshots

JSON Schema

Trạng thái liên kết chia sẻGET/share-snapshots/{snapshotId}snapshotIdJSON

Mã trạng thái HTTP

200 · 400 · 404 · 410 · 503

Mã lý do lỗi

—

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

snapshotId · revision

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/share-snapshots/{snapshotId}

JSON Schema

Thẻ mạng xã hội của liên kết chia sẻGET/share-snapshots/{snapshotId}/opengraphsnapshotIdPNG

Mã trạng thái HTTP

200 · 400 · 404 · 503

Mã lý do lỗi

invalid_identifier 400 · not_found 404 · temporarily_unavailable 503

Truy cập và giới hạn tốc độ

Truy cập ẩn danh; 60 yêu cầu mỗi phút khi bật giới hạn tốc độ phân tán.

Mã định danh ổn định

snapshotId · revision

Nguồn và mức độ không chắc chắn

Read the response status, evidenceState, source timestamps, limitations and gaps; absence is not proof of zero.

Ví dụ gọi API

GET /api/public/v1/share-snapshots/{snapshotId}/opengraph

JSON Schema

Truy cập và sử dụng

Truy cập và sử dụngLimits, caching, versions, privacy and licence
Truy cập
Every GET resource is public and free to use, with or without a key. Bulk and history resources need a Developer key. The two POST resources (making a share link, drawing a street path) only accept requests from otranspo.ca itself.
Giới hạn tốc độ
1,000 calls a day and 60 a minute, with or without a free key; 100,000 a day and 600 a minute on the Developer plan. Read the X-RateLimit-* headers on every answer; X-RateLimit-Status says when limits are degraded.
Keys
Send a key as Authorization: Bearer otr_… or X-API-Key. Never in the address. A wrong, revoked or expired key gets 401, never a keyless answer.
Bộ nhớ đệm
The index is kept 30 seconds by your browser and 5 minutes at the edge. Live resources such as cancellations are sent no-store. Offline timetable pieces never change once published.
Phiên bản
Mỗi phản hồi ghi rõ schema và schemaVersion. Khi có thay đổi gây lỗi, sẽ có đường dẫn /v2 mới, kèm thông báo trước 180 ngày trong các tiêu đề Deprecation, Sunset và Link.
Quyền riêng tư
Đừng gửi dữ liệu cá nhân. Tọa độ gửi đến đường dẫn phố chỉ dùng cho yêu cầu đó, không bao giờ được ghi nhật ký hay lưu trữ. Phản hồi không bao giờ chứa mã tài khoản, lượt tìm chuyến đi, email, địa chỉ mạng hay liên kết bằng chứng nội bộ.
Không rõ không có nghĩa là số không
Phản hồi có thể không khả dụng dù tài nguyên vẫn tồn tại. Hãy đọc status, evidenceState, thời gian của nguồn, phạm vi và các giới hạn. Trạng thái tuyến so sánh lịch chạy với xe buýt quan sát được. Đó không phải là cảnh báo của nhà vận hành.
Giấy phép
Mã nguồn: MIT. Dữ liệu của OC Transpo và STO vẫn theo điều khoản dữ liệu mở riêng của họ và cần ghi nguồn. Số liệu của chúng tôi: CC BY 4.0, ghi nguồn otranspo.ca.
Chưa làm xong
No SDK is published, no second city is supported, and partner tenant-key access is not open. This page does not claim them.
Dữ liệu và tải xuốngCùng các số liệu đó ở dạng tệp CSV và JSON, kèm cách trích dẫn.