You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: provider/README.md
+29-10Lines changed: 29 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,6 +150,15 @@ Please refer to the MDS [General Information][general-information] document.
150
150
151
151
[Top][toc]
152
152
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
+
153
162
## Trips
154
163
155
164
A trip represents a journey taken by a *mobility as a service* customer with a geo-tagged start and stop point.
@@ -331,8 +340,23 @@ Should either side of the requested time range be greater than 2 weeks before th
331
340
332
341
Stop information should be updated on a near-realtime basis by providers who operate _docked_ mobility devices in a given municipality.
333
342
334
-
Endpoint: `/stops/{stop_id}`
335
-
Method: `GET`
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):
344
+
345
+
```json
346
+
{
347
+
"version": "x.y.z",
348
+
"data": {
349
+
"stops": []
350
+
},
351
+
"last_updated": "12345",
352
+
"ttl": "12345"
353
+
}
354
+
```
355
+
356
+
**Endpoint:**`/stops/:stop_id`
357
+
**Method:**`GET`
358
+
**[Beta feature](/general-information.md#beta-features):** Yes (as of 1.0.0)
359
+
**`data` Payload:**`{ "stops": [] }`, an array of objects with the following structure
336
360
337
361
| Field | Type | Required/Optional | Description |
| wheelchair_boarding | Boolean | Optional | Is this stop handicap accessible? |
356
380
| parent_stop | UUID | Optional | Describe a basic hierarchy of stops (e.g.a stop inside of a greater stop) |
357
381
382
+
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.
383
+
358
384
### GBFS Compatibility
359
385
360
386
Some of the fields in the `Stops` definition are using notions which are currently not in MDS, such as `rental_methods`. These fields are included for compatibility with GBFS.
@@ -365,7 +391,7 @@ Some of the fields in the `Stops` definition are using notions which are current
365
391
366
392
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.
367
393
368
-
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:
394
+
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):
369
395
370
396
```json
371
397
{
@@ -378,13 +404,6 @@ In addition to the standard [Provider payload wrapper](#response-format), respon
378
404
}
379
405
```
380
406
381
-
Where `last_updated` and `ttl` are defined as follows:
382
-
383
-
Field Name | Required | Defines
384
-
--------------------| ----------| ----------
385
-
last_updated | Yes | Timestamp indicating the last time the data in this feed was updated
386
-
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).
0 commit comments