-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restructure api and add event-status model #194
Conversation
This is a baseline restructure of the Agency api to address a number of endpoint changes and incorporate feedback received in previous issue and PRs (#161, #116 and #63). Major changes: * `provider_id` is passed as part of an authorization bearer token. * Looking up and registering vehicles use standard `GET` and `POST` operations on `/vehicles` endpoint. * The `/vehicles/{vehicle_id}/event` allows Providers to `POST` events to affect vehicle status. The vehicle status is modeled around a state flow that is modeled in Vehicle Events table. * Deregister vehicle, trip start and end are now events. * Events for `trip_enter` and `trip_leave` were added to address trips that do not start or end in the Agency jurisdiction.
Hi @toddapetersen , love the more restful approach !
|
Oops, just saw your PR #196 , it answers my questions :) For the events, what should happen if the Agency server goes down ? Could we add a timestamp field the event so that if we receive it later, we can know the real time when it occurred ? |
Couple things. This PR needs to target the I noticed that #195 #196 #197 all target this branch rather than |
Need to additionally integrate rebase and integrate #172 before merging this. |
Discussed changes are committed and rebased against dev. Should be good to merge. |
This is a baseline restructure of the Agency api to address a number of endpoint changes and incorporate feedback received in previous issue and PRs (#161 , #116 and #63 ).
Major changes:
provider_id
is passed as part of an authorization bearer token.GET
andPOST
operations on/vehicles
endpoint./vehicles/{vehicle_id}/event
allows Providers toPOST
events to affect vehicle status. The vehicle status is modeled around a state flow that is modeled in Vehicle Events table.trip_enter
andtrip_leave
were added to address trips that do not start or end in the Agency jurisdiction.