REST Rules (that I follow)
For reasons why I do it: Refer REST API Design Rulebook (Mark Masse)
/ - separation should represent an hierarchy. e.g api.karngyan.com/api/v1/shapes/polygons/quadrilateral/squares
no trailing forward slashes please
use hyphens(-) instead of underscores(_)
use lowercase letters only
no artificial file extensions in uri
resource archetypes: store (CRUD on /users/1234), document(/leagues/seattle), collection(/leagues/seattle/teams), controller(/alerts/1234/resend)
singular nouns for documents
plural noun for collections
plural noun for store names
verb for controller names
Last updated
Was this helpful?