-
Notifications
You must be signed in to change notification settings - Fork 232
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
[Agency] API is REST-like, not RESTful #116
Conversation
@toddapetersen do we want to rework agnecy to be true restful or rest-like as is? |
Yes.
… On Oct 8, 2018, at 12:07 PM, Hunter Owens ***@***.***> wrote:
@toddapetersen <https://github.com/toddapetersen> do we want to rework agnecy to be true restful or rest-like as is?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#116 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/Ag9Otlkb4XhfwAXUWOLYs5pay5kDFYnGks5ui6JxgaJpZM4XFLsn>.
|
@toddapetersen "yes" meaning "rework to be true restful" ? |
Hi @toddapetersen , any news on that one ? |
Hi @toddapetersen, @hunterowens. I submitted a PR for a more RESTful API and can provide adjustments on it if needed. |
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.
* Restructure api and add event-status model 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. * Fix field names for provider api consistency * Linking to provider.csv
I don't want to go into any bike-shedding, and it does not matter if an API is RESTful or REST-like. That said, it is nice to use the correct term to define the API, and this one is clearly REST-like (otherwise we would have a "/vehicles" resource that we could PUT and DELETE, not "register_vehicle" and "deregister_vehicle")