Everyone knows REST APIs.
But how to grade your API to get to know whether it's truly REST or not?
Let's talk about Richardson Maturity Model. ๐งต
But how to grade your API to get to know whether it's truly REST or not?
Let's talk about Richardson Maturity Model. ๐งต
Richardson Maturity Model is the way to grade your API based on the constraint of REST.
Richardson Maturity Model has four levels.
Level 0 โย POX Swamp
Level 1 โ URI
Level 2 โ HTTP Verbs
Level 3 โ Hypermedia
Level 0 โย POX Swamp
Level 1 โ URI
Level 2 โ HTTP Verbs
Level 3 โ Hypermedia
If your API is on level 3 (Hypermedia) according to Richardson Maturity Model then your API is truly REST API.
Let's discuss four levels of the Richardson Maturity Model individually. ๐๐ป
๐ Level 0 โ POX Swamp
Richardson Maturity Model starts with level 0.
At this level:
โข API calls should be RPC
โข Each API uses an HTTP mechanism for interaction
โข Plain Old XML(POX) as the data format
Richardson Maturity Model starts with level 0.
At this level:
โข API calls should be RPC
โข Each API uses an HTTP mechanism for interaction
โข Plain Old XML(POX) as the data format
๐ Level 1 โ URI
URI stands for Uniform Resource Identifier.
You can grade your API to level 1 if users can access multiple resources via URIs and the HTTP POST method.
URI stands for Uniform Resource Identifier.
You can grade your API to level 1 if users can access multiple resources via URIs and the HTTP POST method.
๐ Level 2 โ HTTP Verbs
In level 1 we introduced resources.
You can put your API on level 2 if it has options to manipulate resources using different HTTP Verbs.
We can perform different operations on resources that are not possible just using the POST HTTP method.
In level 1 we introduced resources.
You can put your API on level 2 if it has options to manipulate resources using different HTTP Verbs.
We can perform different operations on resources that are not possible just using the POST HTTP method.
๐ Level 3 โ Hypermedia
You might have noticed that all the levels we discussed above are quite general, and most REST APIs follow that.
But Hypermedia or HATEOAS is something that makes your API truly REST.
You might have noticed that all the levels we discussed above are quite general, and most REST APIs follow that.
But Hypermedia or HATEOAS is something that makes your API truly REST.
HATEOAS stands for Hypermedia As The Engine Of Application State.
HATEOAS defines that clients should be provided with hypermedia, in response to a particular request, which helps them to use or explore further points of an API.
HATEOAS defines that clients should be provided with hypermedia, in response to a particular request, which helps them to use or explore further points of an API.
So is your API at level 3 on the Richardson Maturity Model?
If not, implement HATEOAS and make your API truly REST.
If not, implement HATEOAS and make your API truly REST.
With that said, that's pretty much it for this thread.
Follow @Rapid_API for more exclusive content. ๐๐
Follow @Rapid_API for more exclusive content. ๐๐
Loading suggestions...