What is an API?

Spread the love

Surely you have heard this term before and maybe you have a vague idea about its meaning, but do you really know what an API is and what it is used for? Let’s find out.

An API is a set of functions and procedures that fulfil one or many functions in order to be used by other software. API stands for the Application Programming Interface.

An API allows us to implement the functions and procedures included in our project without the need to program them again. In terms of programming, it is an abstraction layer.

When to Use It?

For example, let’s say you are developing a web application and you need to make HTTP requests. Instead of developing all the code to make an HTTP request, you can use an API that takes care of this, such as Python Requests. If you need to use .yaml files, you can use the Ruby Yaml API.

Now, the term API has evolved a bit with the revolution of web services that gave rise to what is now known as API REST, or as many people call it, only API.

REST API

A REST API is a library fully supported by the HTTP standard. Seen in a simpler way, a REST API is a service that provides us with functions that give us the ability to make use of a web service that is not ours, within an own application, in a secure manner.

A clear example would be the Twitter API. All clients developed by third parties use that API, regardless of the operating system for which they were developed. By implementing it, the API makes certain methods or functions available to you for your development.

When using an API, all the development that you want to perform will be limited by the methods or functions that it includes, that is, new functionalities can not be added. In this way, companies like Twitter make sure of what the clients developed by third parties can or can not do.

So, why waste time reinventing the wheel when an API allows you to use code that other developers have successfully tested? It is better to use those encapsulated functions and focus on your application and its features, the important thing is to ensure you deliver a quality product.

To find out more on this as well as on many other similar topics, stoplight is there to answer your questions.

Leave a Reply