REST is an acronym for Represantational State Transfer and API is an application programming Interface that conforms to the constraints of REST architectural style. Like other architectural style, REST has its guiding principes and constraints. Roy Fielding way first presented it in 2000 is commonly known for four steps to achieve RESTful API.

 

Level 0 : The Swamp of POX

Level zero of maturity does not make use of any of URI, HTTP Methods, and HATEOAS capabilities. This model is using HTTP as a transport system for remote interaction without nothing else.

Image from Codestates: Level 0

 

Level 1: Resources-Based Address/URI

Level one of maturity make use of URIs, but does not use the HTTP Methods, and HATEOAS. At this level, rather than making all out requests to a singular service endpoint, we now start talking to individual resources

 

Image from Codestates: Level 1

Level 2: HTTP Verbs

Level two of maturity makes use of URIs and HTTP Methods, but does not use the HATEOAS. At these levels it does not make much difference, it allow us to tunnel our interactions through HTTP but it use HTTP Methods as closely as possible to how they are used in HTTP itself. So APIs at this level fully utilize all HTTP commands or verbs such as GET, POST, PUT, and DELETE

Image from Codestates: Level 2

Level 3: Hypertext As The Engine Of Application

Level three of maturity makes use of all three, i.e. URIs and HTTPS, and HATEOAS. It's also known as HyperMedia, which basically consists of resource links and forms. Estabilishing connection between resources becomes easy as they do not require human intervention and aids client-driven automation.

Image from Codestates: Level 3

+ Recent posts