Thoughts on REST API's
The architecture pattern REST was introduced by Roy Thomas Fielding in 2000 , since then, developers address the REST pattern as something related to the type of requests, such as GET, POST, PUT and PATCH, eventhough the dissertation presented goes deeper in the architectural style, rather than implementation details.
This post aims to present resources on how to implement REST as well as thoughts on what I saw enterprise doing API’s, sometimes REST and sometimes not so.
To get start with the REST part of things I would like to start present some definitions that I came across during my career. To begin with, having a single sourceof truth about API’s is difficult, since its conception Roy uses broad terms to depict and define what are the constraints of REST and how to create an API that follow those contraints.
Different architectural styles suffer for the “lack” os implementation details, thus, leading to many approaches. For example,  elaborates on a maturity model for REST (Richardson Maturity Model - RMM), in total there are 4 levels, starting from 0 untill 3:
- Level 0 - Using HTTP as a way through communication between systems.
- Level 1 - Usage of resources to represent capabilities, at this stage, systems might use only one HTTP verb, which usually is the POST verb.
- Level 2 - Using HTTP verbs to express intent
- Level 3 - The last one is named HATEOAS (Hypermidia As The Engine Of Application State)
The maturity model, gives a common ground to start analyzing the REST implementation and trying to improve its structure, being used across different authors .
Therefore, API’s I have worked with usually are between the Level 0 and 2, I don’t recallseeing professinally an API that is Level 3.
- R. T. Fielding, “Architectural Styles and the Design of Network-based Software Architectures,” 2000 [Online]. Available at: https://www.bibsonomy.org/bibtex/217b085721104f50d2f804bd1df197edc/gromgull. [Accessed: 29-Aug-2020]
- M. Fowler, “Richardson Maturity Model,” 2010 [Online]. Available at: https://martinfowler.com/articles/richardsonMaturityModel.html. [Accessed: 17-Sep-2021]
- H. Subramanian and P. Raj, Hands-On RESTful API Design Patterns and Best Practices: Design, develop, and deploy highly adaptable, scalable, and secure RESTful web APIs. Packt Publishing Ltd, 2019.
Table of contents
Got a question?
If you have question or feedback, don't think twice and click here to leave a comment!