Ever since the start of the year, the top priority for us at APIMatic was to improve the packaging of our products and features. We launched the Developer Experience Portal, added package publishing capabilities to our eco-system, added curl commands to our console, revamped our Developer Portal to optimize loading speeds and so on.
With our new products and offerings, we needed new APIs to allow our users more points of access. This gave us a perfect opportunity to revamp our existing APIs as well, which were developed for internal use only and were never designed to have the perfect structure, naming or performance. However when duty called
we rose up to the occasion and revamped our entire infrastructure to make the perfect little REST APIs.
Goals
Developer Experience is the most important metric to measure the quality of an API. For us at APIMatic it is the rule of law, it’s the word of god, it’s everything. We have always preached the idea of well-designed APIs that are super easy to use and make the life of developers easy. An API is not a random chunk of code, it’s an interface, and like any interface, you need to make sure that the experience you’re providing is as smooth and seamless as possible because that is what developers are looking for.
With developer experience as the goal post, the direction we took for implementing our new APIs was very clear. Let’s briefly look at the fundamental concepts that were under consideration throughout the development cycle:
Stable and even more importantly Scalable APIs.
Making our APIs truly RESTFUL by adhering to the constraints of REST as much as possible.
Ensure backward compatibility for our public APIs.
Focusing on simplicity, extensibility, reliability, and performance.
Sticking to popular standards to create uniformity in the code.
Prioritize naming and making it consistent across the application.
Improving the readability and structuring of the code to optimize it for incremental upgrades in the future.
Creating the APIs to be easily testable and then writing Unit Tests for them.
The Richardson Maturity Model
The Richardson Maturity Model is a great way to grade your API according to the constraints of REST. The better your API adheres to these constraints, the higher its score is. The Richardson Maturity Model knows 4 levels (0–3), where level 3 designates a truly RESTful API.