What does it mean to be RESTful?
REpresentational State Transfer is a software architectural design pattern that guides our web development. The client interacts with the server through a set of systematic and predefined operations, most commonly HTTP methods. In REST, these operations are stateless, meaning the server’s response to input from the client is independent of any prior state. The data passed in becomes paired to the request itself.
Follow below best practices to ensure your web API is as RESTful as possible!
- Nouns over verbs
- Spinal-case
- HATEOAS
- Status Codes
Nouns over verbs
Resources should be described with pluralized, lowercase nouns to be RESTful rather than verbs. Let’s see why with an example.
Say we define below APIs in a simple Department store model:
- /viewdepartment
- /editdepartment
- /updatedepartment
- /deletedepartment
This naming pattern would become very difficult to maintain as functionality, and subsequently count, increases.
Instead, leverage HTTP methods to make things more uniform:

Much cleaner!
Spinal-case
Another naming convention in REST is to use hyphens (spinal-case) rather than underscores (snake_case). The reason for this is that an underscore can be partially obscured or difficult to see in some browsers or screens. Avoid this with hyphens!
HATEOAS
aka Hypermedia as the Engine of Application State, is an important component of REST. This is the concept that the client shouldn’t need any prior knowledge of your web app to interact with it effortlessly and successfully. Responses in a RESTful API describe to the client how it should be used, specifically through Hypermedia. An easy example is the use of links to guide the user, like an “add to cart” link.
Status Codes
Help out the user with errors as much as possible by indicating the correct status code. Here’s a table of some of the most common status codes:

REST IS THE BEST!
zzzzzzzzzzzz
