The principle of consistency is very important in API design. Arnaud Lauret, the author of the book The Design of Everyday APIs, elegantly outlined four different types of consistency in his blog post The four levels of consistency in API design (restlet.com/company/blog/2017/05/18/the-four-levels-of-consistency-in-api-design/), which we've summarized here:
- Common: Being consistent with the world
- Local: Being consistent within the same API
- Transversal: Being consistent across different APIs by the same organization
- Domain: Being consistent with a specific domain
I have made one addition to this list—perennial consistency—or being consistency across time.
Let's examine each one individually.