DEV Community

Linx Software
Linx Software

Posted on

Building an API? The 33 tools you need to consider

With APIs taking over, more people are asking: What can I use to create my API? Although there are many different API standards and types, we will primarily focus on REST APIs. An API can be as simple as a single endpoint with one purpose, or it can be much more complex, like the AWS APIs with 1000s of endpoints and 100s of thousands of users.

What all of these APIs have in common is that they have to be developed. We like to classify the development of APIs in 3 phases: Design, Build and Host.

Since REST is the most popular API interface, we will look at a REST API’s design, build and hosting. In this post, we will look at the 3 phases of API development and some valuable tools to assist you in your API journey.

Design, Build and Host your next API

REST APIs do not just exist out of thin air. It takes work to get one up and running. Luckily we can learn from those who came before us. Here are the three steps you need to plan for before building your API

Step Input Output
Design User requirements Specification e.g. OpenAPI3
Build Design specification Working code
Host Working code API live 24×7

Each of these steps has its own set of API design tools. Here are some I’ve used and popular alternatives

Design

INPUT: User Requirements. OUTPUT: Specification

During this phase, we need to ensure that you will create the API to fulfil a specific requirement. You need to take the user requirements for our API and transform them into a specification for our API. The result of this phase is usually some kind of documentation and an API specification. When designing the API, an outcome is the API specification. We prefer this specification to be OpenAPI.

“The OpenAPI Specification (OAS) defines a standard, language-agnostic interface to RESTful APIs, allowing humans and computers to discover and understand the service’s capabilities without access to source code, documentation, or through network traffic inspection.”

The OpenAPI specification is produced in either JSON or YAML. However, those specification languages do come with their challenges. For JSON, what bracket am I on again? And for YAML, how many spaces are there again for this object? Luckily, a few tools can help you create your OpenAPI specification:

  • Swagger: They have two options, the Swagger Editor (free to download) and Swagger hub (their hosted service). This service defines, visualises and validates APIs in a collaborative environment.
  • Postman: In their own words, “Postman is an API platform for building and using APIs”.
  • Insomnia: A free cross-platform desktop application that takes the pain out of interacting with and designing HTTP-based APIs.
  • Stoplight: Offers tooling across the API lifecycle that helps you build quality APIs efficiently.

Build

INPUT: Design Specification. OUTPUT: Working code

Now that we have defined what we need our API to do and have a specification, you can start building. For many, this is the fun part, creating the code that will execute when our API is called. Before starting any coding, ensure you know the logic you need to add to our API process. Business Logic is commonly used to enable:

  • Trigger automation such as email and push notifications on developer-defined changes in the data store.
  • Optimizing the data exchange with the app by joining multiple data collections.
  • Validating app user actions to enforce business rules.
  • Providing a means to host platform-agnostic code and save development time on multi-platform apps.

There are quite a few options here. You can choose to build your API with a full code framework such as NodeJS, Python: Django or ASP.NET.

Another option is to build your API with a low-code tool. I prefer Linx. A low code platform can allow you to quickly build the backend functionality of your API with pre-tested and proven components.

Before we get to building our API. Depending on your requirements, you might need to do a host of different things when your API is called. You may need to store data, send emails, use message queues and more. We will now take a look at a few tools that can be useful for building your API.

Data Storage

You will likely need to store data for your application. If you do not have an existing data storage platform, you might have some research to do. There are plenty of possibilities, each with its pros and cons.

  • AWS: AWS has a selection of database hosting options suited to various needs. These options can be quite scalable and flexible depending on your requirement, budget and technical ability
  • Azure: As with AWS, Azure also has various database options.
  • MongoDB: As per their website, “MongoDB is a document database with the scalability and flexibility that you want with the querying and indexing that you need”
  • MySQL: MySQL is an open-source relational database management system (RDBMS). It can be hosted on-premise, in the cloud (via a platform such as AWS or Azure), on a local machine or even in a docker container.
  • PostgreSQL: PostgreSQL is a powerful, open-source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads. It can be hosted on an on-premise server or by a service provider like AWS or Azure.

There are many other choices regarding data storage, be sure to pick the right one for you. A few things to consider are:

  • Do I want to host the database myself, or will it be hosted in the cloud?
  • Do I want to maintain the database myself?
  • What speed and scalability do I want from my data storage?

Utilities

You may also require some other utilities for your API, such as

Email platforms

Queues

Security

Consider Low-Code

The reasons to build an API in low-code are plentiful, but it mostly comes down to the time saved and simplicity. Tools such as Linx are a great fit for API development. It is a low-code tool for creating back-end processes, but it can also host and call web services. Some things you can do with Linx: Read, Create and alter files, perform data operations such as database read and write operations, integrate several different services and more.

Linx low-code IDE The Linx Designer

Programming Languages
If you choose to go with a full code framework, here are some of the frameworks you can choose from when

If you haven’t recently tried a low-code tool I suggest trying one for your next small project. Pick something that you want to get out of the door quickly. Even better if you expect it to be mostly boilerplate. You might be surprised at how much they can improve your development speed.

Another interesting angle is building ‘serverless’ functions using AWS Lambda or Azure functions to implement the API. I’ve found that the architectural complexity eats a lot of time, but if you’re already familiar with those platforms, it might be an easy way to build a couple of endpoints.

Regardless of what approach or framework you choose, the outcome of this phase is working code that can be called to execute the API. For example, let’s say you require the API to return a data set from a data source (such as a database), the code will allow us to call an endpoint with a request body, and the code will retrieve the relevant data and return it to us. Since you are not hosting the API just yet, you will likely use “localhost”.

API Testing Tools

During the building phase, we need to test our API to ensure it is working properly. Here you have a few options:

  • Use a web browser: If your API is simple enough, this is possible, you won’t get the nicest output, but it will work in a pinch.
  • Hoppscotch.io: This tool makes testing your REST APIs much more manageable and is free to use when writing.
  • Postman
  • Insomnia

Hosting

INPUT: Working code. OUTPUT: API live 24×7

Now that your API is built and tested, you will need to ensure that it is reachable by your users. The simplest thing is to use a hosting platform that supports your programming language of choice. Services like

Or in the low-code case, the low-code platform does the hosting. These platforms usually have a few options to choose from, and if, with time, your API grows and needs more resources, contact the low-code platforms support team to find out what your options are.

This, of course, is not your only option. If you have an on-premise server, you can also opt to host the API yourself. It all depends on your ability to do so and risk appetite (since you are housing it by yourself, you will have to think of security and performance)

Final Thoughts

It is incredible to see how surprisingly easy things have become when compared to the way things were done just a few years ago. The thought of a time when you wanted a database, you needed to build it yourself or if you wanted to send a message through the internet, you required both a degree in mathematics, electrical engineering and computer science.

Now APIs are everywhere. They help us integrate third-party features, connect enterprise systems, and exchange data between apps. Learning how to build a rest API turns regular developers into digital superheroes. Today, you don’t need to be an experienced developer to build complex applications using high-performance parts with minimum effort and the minimum of code if you use the right tools.

Top comments (2)

Collapse
 
arlemi profile image
Arlemi

Great list of tools! I wish your article at an index at the top it'd make it easier to jump directly to relevant sections. :D

Collapse
 
ishanpro profile image
Ishan Tiwari

Can you really use Netlify for hosting an API ? I think that is for static site hosting.