Skip to content
This repository has been archived by the owner on Nov 10, 2022. It is now read-only.

Commit

Permalink
Change event_time definition to require correct ordering
Browse files Browse the repository at this point in the history
This proposal reflects the consensus of the status change
ordering/uniqueness breakout group that it's reasonable to ask Providers
to construct an accurate and causally-consistent timeline of status
change events.
  • Loading branch information
rf- authored and hunterowens committed Jun 8, 2019
1 parent be1b4f1 commit 7652956
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion provider/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,15 @@ Schema: [`status_changes` schema][sc-schema]
| `propulsion_type` | Enum[] | Required | Array of [propulsion types](#propulsion-types); allows multiple values |
| `event_type` | Enum | Required | See [event types](#event-types) table |
| `event_type_reason` | Enum | Required | Reason for status change, allowable values determined by [`event type`](#event-types) |
| `event_time` | [timestamp][ts] | Required | Date/time that event occurred, based on device clock |
| `event_time` | [timestamp][ts] | Required | Date/time that event occurred at. See [Event Times](#event-times) |
| `event_location` | GeoJSON [Point Feature][geo] | Required | |
| `battery_pct` | Float | Required if Applicable | Percent battery charge of device, expressed between 0 and 1 |
| `associated_trip` | UUID | Required if Applicable | Trip UUID (foreign key to Trips API), required if `event_type_reason` is `user_pick_up` or `user_drop_off`, or for any other status change event that marks the end of a trip. |

### Event Times

Because of the unreliability of device clocks, the Provider is unlikely to know with total confidence what time an event occurred at. However, they are responsible for constructing as accurate a timeline as possible. Most importantly, the order of the timestamps for a particular device's events must reflect the Provider's best understanding of the order in which those events occurred.

### Status Changes Query Parameters

The status_changes API should allow querying status changes with a combination of query parameters.
Expand Down

0 comments on commit 7652956

Please sign in to comment.