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
+6-16Lines changed: 6 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -249,8 +249,6 @@ Trips that start or end at a [Stop][stops] must include a `stop_id` property in
249
249
250
250
The `/events/recent` and `/events/historical/` endpoints return a list of Event objects, describing the activity of the Provider's vehicles. Recent events are at most two weeks old and can be queried with start/stop time, and historical events are packaged in hour-sized chunks for ease of implementation.
251
251
252
-
(?) This distinction is a holdover from MDS 1.x. Dramatic simplification of the query is meant to make cold storage by hourly chunks trivial without a database. We should ask Providers if that has been a concern in practice. Alternatively they could be the same endpoint with different parameters.
253
-
254
252
Unless stated otherwise by the municipality, this endpoint must return only those status changes with a `event_location` that [intersects](#intersection-operation) with the [municipality boundary](#municipality-boundary).
255
253
256
254
> Note: As a result of this definition, consumers should query the [trips endpoint][trips] to infer when vehicles enter or leave the municipality boundary.
@@ -267,8 +265,8 @@ Unless stated otherwise by the municipality, this endpoint must return only thos
267
265
268
266
The `/events/historical` API uses the following query parameter:
269
267
270
-
| Parameter | Format | Expected Output |
271
-
| ---------------| ------ | --------------- |
268
+
| Parameter | Format | Expected Output |
269
+
| ---------| ------ | --------------- |
272
270
|`event_time`|`YYYY-MM-DDTHH`, an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended datetime representing an UTC hour between 00 and 23. | All status changes with an event time occurring within the hour. For example, requesting `event_time=2019-10-01T07` returns all status changes where `2019-10-01T07:00:00 <= status_change.event_time < 2019-10-01T08:00:00` UTC. |
273
271
274
272
Without an `event_time` query parameter, `/events` shall return a `400 Bad Request` error.
@@ -514,17 +512,11 @@ Unless stated otherwise by the municipality, this endpoint must return only thos
514
512
515
513
#### Telemetry - Query Parameters
516
514
517
-
The telemetry API should allow querying with a combination of query parameters:
518
-
519
-
| Parameter | Type | Expected Output |
520
-
| ----- | ---- | -------- |
521
-
|`start_time`|[timestamp][ts]| telemetry where `start_time <= telemetry.timestamp`|
522
-
|`end_time`|[timestamp][ts]| telemetry where `telemetry.timestamp < end_time`|
523
-
| `trip_id` | UUID | telemetry where `telemetry.trip_id == trip_id`
515
+
| Parameter | Format | Expected Output |
516
+
| --------- | ------ | --------------- |
517
+
|`telemetry_time`|`YYYY-MM-DDTHH`, an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended datetime representing an UTC hour between 00 and 23. | All telemetry with timestamp occurring within the hour. For example, requesting `telemetry_time=2019-10-01T07` returns all telemetry where `2019-10-01T07:00:00 <= telemetry.timestamp < 2019-10-01T08:00:00` UTC. |
524
518
525
-
Should either side of the requested time range be missing, or a `trip_id` is not present, `/events` shall return a `400 Bad Request` error.
526
-
527
-
Should the requested time range exceed 2 weeks, `/telemetry` shall return a `400 Bad Request` error.
519
+
Without a `telemetry_time` query parameter, `/telemetry` shall return a `400 Bad Request` error.
528
520
529
521
[Top][toc]
530
522
@@ -555,8 +547,6 @@ In addition to the standard [Provider payload wrapper](#response-format), respon
555
547
**Schema:**[`vehicles` schema][vehicles-schema]
556
548
**`data` Payload:**`{ "vehicles": [] }`, an array of [Vehicle](vehicle) objects
557
549
558
-
(?) Open question: should we standardize on telemetry over GeoJSON Point? E.g. replace last_event_location with last_event_telemetry.
0 commit comments