Skip to main content

What is REST?

Representational state transfer (REST) is a software architectural style.

Now to remember this style, let's break REST abbreviation.

R stand for Resource ( a resource could be a user or product like we creating User API,  Product API)


E stand for Endpoint ( to access the resource there should be an endpoint like we can have an endpoint for user API learnonlineasp.net/user)


S stand for Stateless (  as the word itself said, it does not maintain the state. Now here another question that may come to your mind  'what the meaning of state here?'  So whenever you calling that Resource endpoint you have to give all the required details instead of relies on information from the previous request or anything or in other words you can say it treat every request as new like we passing token in the header for each request


T stand for Transfer ( we have Resource, we have Endpoint but how you can access that endpoint? So to access that endpoint REST architecture style uses a subset of HTTP (Hyper Text Transfer Protocol) so now the complete URL will be http://LearnOnlineAsp.net/user. 


I hope till above you understood some details about REST.


Now to improve performance, scalability, simplicity, modifiability, visibility, portability, and reliability we have to follow some constraints and below are those formal REST constraints :

  1. Client-server architecture
  2. Statelessness
  3. Cacheability
  4. Layered system
  5. Code on demand (optional)
  6. Uniform interface


Happy learning 👐