Evaluating different ways to build APIs without coding
In this post I will take a look at different ways how to build an API without coding. This gives you an overview about the current landscape of API development and could help you to choose the right tool for the job. Also let me note, I am the developer of Fusio which is an open source API management system. So lets start and look at the different approaches.
1. Database Wrapper
Probably the most popular approach is to create a REST API based on your existing database. That means the API platform provides endpoints to CRUD records on a table. While this can be useful, in most cases your backend API needs to contain some logic to be actual useful. I.e. maybe you want to create an email if a specific record was created or you want to trigger an external API, with such wrapper platforms this is not possible. I think the actual value of most APIs lies exactly in this glue code between the database and the consumer. This approach targets developers and end users since you only need to connect an existing database to the platform and your API is ready.
2. API Entity
At the API entity approach we have a way to create custom entities and the platform then provides endpoints to CRUD those entities. This approach is used mostly by headless CMS platforms like i.e. Directus. While this is more flexible then a database wrapper you still have problems if you want to handle additional logic. This approach targets also developers and end users since most platforms provide a nice interface to design those entities.
3. Code Entity
At the code entity approach we use an entity class instead of a table. This means that you need to create a source file describing your entity and based on this entity the API platform creates a complete API to CRUD those entities. The platform then uses an ORM, so instead of a table we work on an entity class. I.e. the API Platform uses this approach. While it is more flexible then a database wrapper it is still focused on CRUD operations for an entity. This approach is targeted at developers since you need to create source files and you need to know how the ORM works.
4. Code Generation
At the code generation approach the source of truth is a schema specification. Based on this specification it is possible to generate a complete API to CRUD those defined entities. This means the platform generates source code which handles those operations i.e. Fusio provides the apigen.app which follows this approach. It is then also possible to modify this source code to add additional logic to your CRUD API. This approach targets developers and end users since the code generator has mostly a nice interface to design the specification.
Summary
We have looked at different ways how to create an API without coding. I think the trend is moving forward to solutions which dont require complete custom coding and more to Low/No-Code solutions since development and maintenance of custom coding is often very expensive and for a company it is also difficult to find the fitting developers. So I hope I could give you an overview about the current landscape and please let me know if you follow also a different approach.