Skip to content

Commit 1a82497

Browse files
committed
moving realtime requirements to realtime section
elevate 5-minute requirement from /vehicles to this section use reference links
1 parent 4d3993b commit 1a82497

1 file changed

Lines changed: 20 additions & 14 deletions

File tree

provider/README.md

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ This specification contains a data standard for *mobility as a service* provider
99
* [Status Changes][status]
1010
* [Realtime Data](#realtime-data)
1111
* [GBFS](#GBFS)
12+
* [Data Latency Requirements][data-latency]
1213
* [Events][events]
14+
* [Stops][stops]
1315
* [Vehicles][vehicles]
1416

1517
## General Information
@@ -150,15 +152,6 @@ Please refer to the MDS [General Information][general-information] document.
150152

151153
[Top][toc]
152154

153-
### Near-RT Data Requirements
154-
155-
All near-RT endpoints must contain `last_updated` and `ttl` properties in the top-level of the response body. These properties are defined as:
156-
157-
Field Name | Required | Defines
158-
--------------------| ----------| ----------
159-
last_updated | Yes | Timestamp indicating the last time the data in this feed was updated
160-
ttl | Yes | Integer representing the number of milliseconds before the data in this feed will be updated again (0 if the data should always be refreshed).
161-
162155
## Trips
163156

164157
A trip represents a journey taken by a *mobility as a service* customer with a geo-tagged start and stop point.
@@ -305,9 +298,20 @@ GBFS 2.0 includes some changes that may make it less useful for regulatory purpo
305298

306299
[Top][toc]
307300

301+
### Data Latency Requirements
302+
303+
The data returned by a near-realtime endpoint should be as close to realtime as possible, but in no case should it be more than 5 minutes out-of-date. Near-realtime endpoints must contain `last_updated` and `ttl` properties in the top-level of the response body. These properties are defined as:
304+
305+
Field Name | Required | Defines
306+
--------------------| ----------| ----------
307+
last_updated | Yes | Timestamp indicating the last time the data in this feed was updated
308+
ttl | Yes | Integer representing the number of milliseconds before the data in this feed will be updated again (0 if the data should always be refreshed).
309+
310+
[Top][toc]
311+
308312
### Events
309313

310-
The `/events` endpoint is a near-ish real-time feed of status changes, designed to give access to as recent as possible series of events.
314+
The `/events` endpoint is a near-realtime feed of status changes, designed to give access to as recent as possible series of events.
311315

312316
The `/events` endpoint functions similarly to `/status_changes`, but shall not included data older than 2 weeks (that should live in `/status_changes.`)
313317

@@ -340,7 +344,7 @@ Should either side of the requested time range be greater than 2 weeks before th
340344

341345
Stop information should be updated on a near-realtime basis by providers who operate _docked_ mobility devices in a given municipality.
342346

343-
In addition to the standard [Provider payload wrapper](#response-format), responses from this endpoint should contain the last update timestamp and amount of time until the next update in accordance with the [Near RT Data Requirements](#near-rt-data-requirements):
347+
In addition to the standard [Provider payload wrapper](#response-format), responses from this endpoint should contain the last update timestamp and amount of time until the next update in accordance with the [Data Latency Requirements][data-latency]:
344348

345349
```json
346350
{
@@ -355,7 +359,7 @@ In addition to the standard [Provider payload wrapper](#response-format), respon
355359

356360
**Endpoint:** `/stops/:stop_id`
357361
**Method:** `GET`
358-
**[Beta feature](/general-information.md#beta-features):** Yes (as of 1.0.0)
362+
**[Beta feature][beta]:** Yes (as of 1.0.0)
359363
**`data` Payload:** `{ "stops": [] }`, an array of [Stops](/general-information.md#stop)
360364

361365
In the case that a `stop_id` query parameter is specified, the `stops` array returned will only have one entry. In the case that no `stop_id` query parameter is specified, all stops will be returned.
@@ -364,9 +368,9 @@ In the case that a `stop_id` query parameter is specified, the `stops` array ret
364368

365369
### Vehicles
366370

367-
The `/vehicles` endpoint returns the current status of vehicles on the PROW. Only vehicles that are currently in available, unavailable, or reserved states should be returned in this payload. Data in this endpoint should reconcile with data from the `/status_changes` enpdoint. The data returned by this endpoint should be as close to realtime as possible, but in no case should it be more than 5 minutes out-of-date. As with other MDS APIs, `/vehicles` is intended for use by regulators, not by the general public. It does not replace the role of a [GBFS][gbfs] feed in enabling consumer-facing applications.
371+
The `/vehicles` endpoint returns the current status of vehicles on the PROW. Only vehicles that are currently in available, unavailable, or reserved states should be returned in this payload. Data in this endpoint should reconcile with data from the `/status_changes` enpdoint. As with other MDS APIs, `/vehicles` is intended for use by regulators, not by the general public. It does not replace the role of a [GBFS][gbfs] feed in enabling consumer-facing applications.
368372

369-
In addition to the standard [Provider payload wrapper](#response-format), responses from this endpoint should contain the last update timestamp and amount of time until the next update in accordance with the [Near RT Data Requirements](#near-rt-data-requirements):
373+
In addition to the standard [Provider payload wrapper](#response-format), responses from this endpoint should contain the last update timestamp and amount of time until the next update in accordance with the [Data Latency Requirements][data-latency]:
370374

371375
```json
372376
{
@@ -405,6 +409,7 @@ In addition to the standard [Provider payload wrapper](#response-format), respon
405409
[agps]: https://en.wikipedia.org/wiki/Assisted_GPS
406410
[beta]: /general-information.md#beta
407411
[costs-and-currencies]: /general-information.md#costs-and-currencies
412+
[data-latency]: #data-latency-requirements
408413
[decimal-degrees]: https://en.wikipedia.org/wiki/Decimal_degrees
409414
[dgps]: https://en.wikipedia.org/wiki/Differential_GPS
410415
[events]: #events
@@ -426,6 +431,7 @@ In addition to the standard [Provider payload wrapper](#response-format), respon
426431
[responses]: /general-information.md#responses
427432
[status]: #status-changes
428433
[status-schema]: dockless/status_changes.json
434+
[stops]: #stops
429435
[st-intersects]: https://postgis.net/docs/ST_Intersects.html
430436
[toc]: #table-of-contents
431437
[trips]: #trips

0 commit comments

Comments
 (0)