Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

HenriJ
Copy link

@HenriJ HenriJ commented Oct 3, 2018

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")

@hunterowens
Copy link
Collaborator

@toddapetersen do we want to rework agnecy to be true restful or rest-like as is?

@toddapetersen
Copy link
Contributor

toddapetersen commented Oct 8, 2018 via email

@HenriJ
Copy link
Author

HenriJ commented Oct 10, 2018

@toddapetersen "yes" meaning "rework to be true restful" ?
I have a little bit of spare time time in the next days, I could work on it with my team if you are open to it.

@thekaveman thekaveman added the Agency Specific to the Agency API label Oct 10, 2018
@HenriJ
Copy link
Author

HenriJ commented Oct 23, 2018

Hi @toddapetersen , any news on that one ?
It would also help us if you could have a look on #148

@lionel-panhaleux
Copy link
Contributor

Hi @toddapetersen, @hunterowens. I submitted a PR for a more RESTful API and can provide adjustments on it if needed.

toddapetersen added a commit that referenced this pull request Dec 12, 2018
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.
hunterowens pushed a commit that referenced this pull request Dec 20, 2018
* 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
@hunterowens
Copy link
Collaborator

@HenriJ Let's close this, in light of merging #194 which is inspired by this work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agency Specific to the Agency API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants