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

Add rules, conventions and suggestions. #5

Open
5 of 16 tasks
agerace opened this issue Mar 8, 2017 · 0 comments
Open
5 of 16 tasks

Add rules, conventions and suggestions. #5

agerace opened this issue Mar 8, 2017 · 0 comments

Comments

@agerace
Copy link
Member

agerace commented Mar 8, 2017

  • Use snake_case with JSON
  • Don't use response envelopes by default
  • Use all HTTP verbs ( Not everything is a GET )
  • No, really, use them, and use them good. Semantic use of HTTP Verbs
  • Use Nouns for endpoints names ( URLs )
  • Plural Nouns vs. Singular Nouns ( /me => /users/:id )
  • Pagination ( The rule breakers )
  • Return something useful from POST, PATCH & PUT requests
  • Right use of Status Codes
  • Version via the headers, not via URL (SUGGESTION)
  • Use query parameters for advanced filtering, sorting & searching
  • Use JSON where possible, XML only if you have to
  • Consider using JSON for POST, PUT and PATCH request bodies
  • Define a consumable error payload
  • Effectively use HTTP Status codes
  • Use token based authentication, transported over OAuth2 where delegation is needed
agerace pushed a commit that referenced this issue Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant