In today’s highly competitive market, integrating with an external database or scraping the data is not sustainable. In today’s market, every second counts, and by the time you collect the data and analyze it, the data will have changed. To resolve this issue, today, big company giants are using API, where you are authorized to fetch the data from the respective sites by integrating the API in your application directly.
Sounds amazing, right, but it’s easier said than done. Especially in a low-code platforms like OutSystems, where you can integrate any REST API with just a few simple steps if you have the proper knowledge about the process.
In this blog, we will go through the guide on how you can consume or integrate the API in your application.
Before we get started, let’s structure our blog to have a better understanding of what we are going to cover in this blog.
Table of Contents
1. Operations of REST API
2. How To Consume API in OutSystems
3. Conclusion
Now let’s get started !!!
Operations of REST API
REST API have specific operations which a user can perform on it, which are mainly divided into these two: 1) Expose API, 2) Consume API.
Before we understand what these operations are and what they do, if you want to know what an is API or how a REST API works, do check out this blog How to Consume REST API in Outsystems.
Expose API
Expose API is the operation where the creator is creating an API with the intention of making it accessible to others, who wants to fetch the data through that API.
In simple language, we can say that exposing a REST API is making some features or functionalities of an application or the whole application accessible to other developers so that they can integrate or use them in their applications to get the desired results.
In addition to that, exposing the API let the creator can add additional logic to fulfil the task or create a functionality they wanted.
Consume API
Consume API is the operation where the user acts as a consumer and integrates or adds the functionality to their respective application, which is being offered in the API.
In simple words, we can say that when a developer takes or uses the API from a third-party to make a functionality or outsource a functionality in their application, then that operation is called consuming the API.
For example, if a user wanted to fetch data from Amazon website, then they can use the Amazon API consume for their desired purposes.
# How To Consume API in OutSystems
Now that we understand what is an API and what its operations are, now is high time to understand how to consume an API from OutSystems.
Step 1 :
After opening the application, click on the **Logic** tab on the top right of the screen, with three other tabs. Inside the **Integration** folder, you can see **REST**. As shown in the picture below.

Step 2 :
Then, when hover on the REST and right-click on it, then a pop-up menu will appear where you have to select the Consume REST API option. You can also refer to the given image for reference.

\
Step 3 :
After clicking on the Consume REST API option, another pop-up will appear where you have to accept the Add single method; if you want to add a single method, otherwise you can also use Add Multiple Methods.
As in the Add multiple methods, there is no such option of testing the API, so that is why it is recommended to choose Add single method, and in this blog also we will also use Add single method.

Step 4 :
After completing the previous steps, another pop-up will appear where you need to paste the API URL in the highlighted area, as well as you can also choose the method type from the dropdown on the left side of the highlighted part.

Step 5 :
Then click on the Test tab, where there are two more tabs in the pop-up, then click on the Test button to test if the API is responding correctly or not, and then you can click on the Finish button to consume the API.

Step 6 :
Now you will find an action of the REST API, in the REST folder, which you can use in any client or server action for further usage.

Conclusion
REST API is one of the easiest and most commonly used methods to integrate or outsource the different functionalities or databases from third parties. It not only empowers the developers of OutSystems but also gives them the liberty to build dynamic, interconnected applications that can do wonders in a data-driven world.
By following the guide in the blog, anybody can configure the endpoints and easily handle the authentication for the mapping responses.
To learn more about OutSystems and there features, subscribe to our newsletter.
Happy Coding !!!




