DEV Community

Discussion on: What is a REST API?

Collapse
 
andychiare profile image
Andrea Chiarelli

With REST API architecture, a request for the same resource should have the same data.

This sounds weird to me. Maybe you wanted to refer to idempotence for some CRUD operations, but that is another story...

To obtain a uniform interface, you have to define your API following four constraints:

  1. identification of resources
  2. manipulation of resources through representations
  3. self-descriptive messages
  4. hypermedia as the engine of application state (HATEOAS)