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

Infrastructure: Refactor API for consistency #52

Open
jdmedlock opened this issue Nov 26, 2017 · 0 comments
Open

Infrastructure: Refactor API for consistency #52

jdmedlock opened this issue Nov 26, 2017 · 0 comments

Comments

@jdmedlock
Copy link
Collaborator

As a Web Developer I need an API that is consistent and logical so I can easily understand it.

Our API URLs are not consistent in their composition and the way parameters are passed. As an alternative consider the following API composition rules:

  • Use lower case
  • Replace %20 (spaces) with dashes
  • Format as '/entity/parameters...' where
  1. Entity is the name of the data element being operated on. For example, idea, user, review, agreement, etc.
  2. The action to be performed is implicit by the type of HTTP request being made - GET: retrieve, DELETE: remove, PUT: create, POST: update
  3. Logical keys identifying the entity to be operated on should be passed as parameters. Properties and their values should be passed in data.
@jdmedlock jdmedlock changed the title Refactor API for consistency Infrastructure: Refactor API for consistency Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant