Repository navigation
Data Model Accessibility
Part of the Data Model. A logical model for the API's read side, not a copy of any physical schema; storage names may differ. Conventions, the record envelope and retention classes: Data Model section 5. API side: Endpoints, Public Transport and Accessibility section 4.
The domain holds the facilities of a station that decide whether a person can get through it without steps (lifts, escalators, ramps), their state over time, and the published step-free paths that depend on them.
erDiagram
stop_place ||--o{ station_facility : "equips"
station_facility ||--o{ facility_state_observation : "reports"
stop_place ||--o{ step_free_path : "offers"
step_free_path ||--|{ path_facility : "needs"
station_facility ||--o{ path_facility : "is needed by"
source ||--o{ station_facility : "describes"
station_facility {
string facility_id PK
string stop_place_id FK
string facility_kind
string position_text
point location
string operator_name
string facility_status
string status_note
instant status_changed_at
instant status_observed_at
instant expected_back_at
string source_ref FK
}
facility_state_observation {
string facility_id FK
instant observed_at
string facility_status
string prior_status
string status_note
}
step_free_path {
string path_id PK
string stop_place_id FK
string from_label
string to_label
}
path_facility {
string path_id FK
string facility_id FK
int position
}
A lift, escalator or ramp at a stop place, with its current state as a current-state group of fields. Retention REF for the facility, CUR for the state fields.
| Field | Type | Req | Unit / format | Constraints and values | Description | API field |
|---|---|---|---|---|---|---|
facility_id |
id |
yes | Identity |
id (fc_…) |
||
stop_place_id |
id → stop_place
|
yes | Station it belongs to | stopPlace |
||
facility_kind |
enum<facility_kind> |
yes |
elevator, escalator, ramp, other
|
What it is |
kind, kind filter |
|
position_text |
ltext |
no | plain text | Where it is, in the operator's words ("platform 4/5 to the main hall") | description |
|
location |
point |
no | WGS 84 | Position, where published | none in v1 | |
operator_name |
text |
no | Operator of the facility | none in v1 | ||
facility_status |
enum<facility_status> |
yes |
operative, inoperative, unknown
|
Current state |
state, state filter |
|
status_note |
ltext |
no | plain text | The operator's explanation of the state | none in v1 | |
status_changed_at |
instant |
no | UTC | Since when the current state holds | stateSince |
|
status_observed_at |
instant |
yes | UTC | ≥ status_changed_at
|
When the current state was last confirmed | observedAt |
expected_back_at |
instant |
no | UTC | When the operator expects it back in service | expectedBack |
|
| envelope | sourceFamily |
One change of state. A row is added only when the state changes. Retention OBS.
| Field | Type | Req | Unit / format | Constraints and values | Description | API field |
|---|---|---|---|---|---|---|
facility_id |
id → station_facility
|
yes | The facility | none in v1 | ||
observed_at |
instant |
yes | UTC | When the change was seen | none in v1 | |
facility_status |
enum<facility_status> |
yes | New state | none in v1 | ||
prior_status |
enum<facility_status> |
no | null for the first row | State before | none in v1 | |
status_note |
ltext |
no | Explanation at the time | none in v1 |
The observations are the basis for a later history operation; v1 reads only the current state.
A published route through a station that avoids steps, for example from the street to a platform. Retention REF.
| Field | Type | Req | Unit / format | Constraints and values | Description | API field |
|---|---|---|---|---|---|---|
path_id |
id |
yes | Identity | none | ||
stop_place_id |
id → stop_place
|
yes | Station | input of stepFreeAccess
|
||
from_label, to_label
|
ltext |
yes | Start and end of the path | none in v1 |
The facilities a step-free path needs, in order. Link entity, no envelope.
| Field | Type | Req | Unit / format | Constraints and values | Description | API field |
|---|---|---|---|---|---|---|
path_id |
id → step_free_path
|
yes | Path | none | ||
facility_id |
id → station_facility
|
yes | Needed facility | input of stepFreeAccess
|
||
position |
int |
yes | ≥ 1 | Order along the path | none |
| Relationship | Cardinality | Rule |
|---|---|---|
stop_place → station_facility
|
one to many | A facility belongs to exactly one stop place |
station_facility → facility_state_observation
|
one to many | |
stop_place → step_free_path
|
one to many | None where no paths are published |
step_free_path ↔ station_facility
|
many to many through path_facility
|
The facility's natural key is the operator's equipment number within its source.
- The current state is replaced on every change (
CUR), and each change is appended as an observation (OBS). - A state not confirmed within the family's stale threshold is served with
stalefreshness and never as operative (FR-ACCESS-003).
stepFreeAccess is not stored. The documented domain rule reads the step-free paths of the stop place and the current state of every facility they need: yes when every path is usable, partial when some are, no when none is, and unknown whenever any input state is unknown or stale (FR-ACCESS-002).
| Path | Used by |
|---|---|
By stop_place_id, all facilities with their current state, filtered by kind and state |
station accessibility |
By stop_place_id, paths and their facilities |
the step-free rule |
Each facility names its source; the state fields share the facility's source.
| Entity | Operations | Resource members |
|---|---|---|
station_facility |
GET /v1/stop-places/{stopPlaceId}/accessibility, place overview accessibility part |
facilities[] |
step_free_path, path_facility
|
the same |
stepFreeAccess (derived) |
facility_state_observation |
none in v1 |
Field-level mapping: Mapping.
ViaFrei API: a public, keyed, read-only REST API to live German mobility data. Design phase; nothing on these pages is a measurement of a running service. Data on viafrei.de and in every API answer is attributed to its publishers under their licences.
About
Design
- Domain Model
- API Design
- Architecture Overview
- Security and Access Keys
- Rate Limits and Priority
- Performance and Caching
- Configuration
- Observability
Data Model
Technical specification
-
Technical Specification
- Interface
- Scope, Conventions and References
- Protocol
- Common Envelope
- Resource Model
- Endpoints, Places
- Endpoints, Roads
- Endpoints, Energy and Parking
- Endpoints, Public Transport and Accessibility
- Endpoints, Weather Risk, Driving Rules and Composed Features
- Service Endpoints
- Errors
- Authentication and Authorisation
- Rate Limiting, Quotas and Priority
- Data Licensing and Attribution
- Compatibility and Versioning
- OpenAPI Skeleton
- Quality
- Delivery and operations
- Interface
Testing
- Testing Strategy
- Testing and Quality (design summary)
Engineering
Technology choice
- Technology Evaluation
- Architecture: Go
- Architecture: Rust
- Architecture: TypeScript
- Stack Comparison
- Benchmark Plan
Reference