Rest is a set of principles that define how web services should be designed and interact with each other. At its core, rest is based on the concept of resources.

A resource is anything that can be identified and manipulated through a web service. In a restful architecture, resources are accessed through URLs.

 

Each Uri identifies a specific resource and Http verbs are used to perform actions on these resources. For example, a get request can be used to retrieve a resource, while a post request can be used to create a new resource.

 

Stateless 

Rest also emphasizes a stateless client server model. This means that the server should not store any client state between these requests and the client should 
provide all necessary information with each and every request.

This allows for scalability and readability in the system as the server can handle multiple requests simultaneously without needing to maintain client state.

 

 

Common Terms in Rest API

  • Http Verbs
    • Http verbs define the type of actions that can be performed on a resource identified by a Uri.
    • Some common examples of Http verbs are get post, put, delete patch and options.
  • Routing
    • Routing is the process of matching incoming Http requests to the appropriate action methods that will handle those requests.
    • Routing is used to map the URL of a request to a controller and then its action method.
  • Model Binding
    • In software development, especially in layered architectures, a Domain Model and a Data Transfer Object (DTO) have different jobs.
      • Domain Modes
        • Represents the concepts, information, and rules of the business domain. It's a conceptual model of the real-world entities and their relationships relevant to the problem being solved. It encapsulates both data and behavior (business logic).
        • Can have complex relationships with other domain objects, reflecting the real-world associations
      • DTOs
        • Primarily used to transfer data between different layers or subsystems of an application, or across network boundaries (e.g., between the client and the server). 
        • Contains only data, with no business logic.
  • Content Negotiation
    •  
  • Response Types
    •  

 


Related Question