REST Flashcards
What does the acronym REST stand for? What makes a service “RESTful”?
REST is an acronym for REpresentational State Transfer and an architectural style for distributed hypermedia systems.
Restful Web Services is a lightweight, maintainable, and scalable service that is built on the REST architecture.
What protocols and data format do REST services use?
REST structures data in XML, YAML, or any other format that is machine-readable, but usually JSON is most widely used.
What are the architectural constraints of REST?
Client-server architecture
Statelessness
Uniform Interface
Layered system
Cacheability
Code on Demand
Explain the levels of the Richardson Maturity Model
Level 1 tackles the question of handling complexity by using divide and conquer, breaking a large service endpoint down into multiple resources.
Level 2 introduces a standard set of verbs so that we handle similar situations in the same way, removing unnecessary variation.
Level 3 introduces discoverability, providing a way of making a protocol more self-documenting.
Explain the HATEOAS concept
HATEOAS, or Hypermedia as the Engine of Application State, is a complicated-sounding term for a simple idea: A client interacts with a REST API entirely through the responses provided dynamically by the server.
Put even more simply: You shouldn’t need any documentation or out-of-band information to use a REST API.
What is a “resource” in a REST service?
A resource in REST is a similar Object in Object Oriented Programming or is like an Entity in a Database. Once a resource is identified then its representation is to be decided using a standard format so that the server can send the resource in the above said format and client can understand the same format.