issues
search
inaka
/
rest_guidelines
REST API Design Guidelines
Apache License 2.0
11
stars
1
forks
source link
Add rules, conventions and suggestions.
#5
Open
agerace
opened
7 years ago
agerace
commented
7 years ago
[x] Use snake_case with JSON
[x] Don't use response envelopes by default
[x] Use all HTTP verbs ( Not everything is a GET )
[ ] No, really, use them, and use them good. Semantic use of HTTP Verbs
[x] Use Nouns for endpoints names ( URLs )
[x] 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