Home » Uniform Interface

Uniform Interface

This fourth constraint decouples the interface from the implementation. Compare this constraint with using the same Internet browser (uniform interface) to read the news and to do your online banking, despite these being fundamentally different applications.

The uniform interface lets the client talk to the server in a single language, independent of the architectural backend of either. This interface should provide an unchanging, standardized means of communicating between the client and the server, such as using HTTP with URI resources, CRUD (Create, Read, Update, Delete) and JSON.

The four guiding principles of the uniform interface are:

  identifying resources: REST APIs should enable clients to identify a resource by means of a URI contained within the request;
  manipulation through representations: given the representation of a resource and any metadata associated with it, the client should be able to modify or delete the resource;
  self-describing messages: the representation of a resource should be returned to the client along with information on how to process it;
  HATEOAS: in addition to returning a representation of the resource in question, a request should also be met by instructions on how to further interact with the resource or API as a whole;

Uniform Interface Uniform Interface concept
Fielding’s thesis part https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm#fig_5_6
Nordic APIs https://nordicapis.com/when-is-an-api-truly-rest-vs-rest-like/
Stackoverflow https://stackoverflow.com/questions/25172600/rest-what-exactly-is-meant-by-uniform-interface
Matthias Biehl https://restapilinks.com/wp-content/uploads/2021/02/api_architecture_biehl.pdf (p.49)