Google News
logo
Rest API - Interview Questions
What is Uniform Interface in REST?
By applying the principle of generality to the components interface, we can simplify the overall system architecture and improve the visibility of interactions.
 
Multiple architectural constraints help in obtaining a uniform interface and guiding the behavior of components.
 
The following four constraints can achieve a uniform REST interface :
 
Identification of resources – The interface must uniquely identify each resource involved in the interaction between the client and the server.

Manipulation of resources through representations – The resources should have uniform representations in the server response. API consumers should use these representations to modify the resources state in the server.

Self-descriptive messages – Each resource representation should carry enough information to describe how to process the message. It should also provide information of the additional actions that the client can perform on the resource.

Hypermedia as the engine of application state – The client should have only the initial URI of the application. The client application should dynamically drive all other resources and interactions with the use of hyperlinks.
Advertisement