1. What is Richardson Maturity Model
Leonard Richardson analyzed a hundred different web service designs and divided these designs into four categories. These categories are based on how much the web services are REST compliant.
This model of division of REST services to identify their maturity level – is called Richardson Maturity Model.
The more a service employs these factors – the more mature it shall be considered.
2. Maturity Levels
In his analysis, Richardson described total 4 maturity levels as given below:
- Level Zero
- Level One
- Level Two
- Level Three
Note that Roy Fielding has already made it very clear that level 3 RMM is a pre-condition of REST.
2.1. Level Zero
Level zero of maturity does not make use of any of URI, HTTP Methods, and HATEOAS capabilities.
The services at zero maturity level have a single URI and use a single HTTP method (typically POST).
For example, most SOAP Web Services use a single URI to identify an endpoint, and HTTP POST to transfer SOAP-based payloads, effectively ignoring the rest of the HTTP verbs.
Similarly, XML-RPC-based services send data as Plain Old XML (POX).
2.2. Level One
Level one of maturity makes use of URIs, but does not use the HTTP Methods, and HATEOAS.
The services at maturity level one employ many URIs but only a single HTTP verb – generally HTTP POST.
2.3. Level Two
Level two of maturity makes use of URIs and HTTP Methods, but does not use the HATEOAS.
The level two services generally host numerous URIs i.e. addressable resources.
Such services support several of the HTTP verbs on each exposed resource – Create, Read, Update and Delete (CRUD) services. Here the state of resources, typically representing business entities, can be manipulated over the network.
The designers of the level two services expect people to put some effort into mastering the APIs – generally by reading the supplied documentation.
2.4. Level Three
Level three of maturity makes use of all three, i.e. URIs and HTTP, and HATEOAS.
Level three is the most mature level of Richardson’s model, which encourages easy discoverability. This level makes it easy for the responses to be self-descriptive by using HATEOAS.
Level three services lead the service consumers through a trail of resources, causing application state transitions as a result.