Detailed Difference between Consume and Expose API

Hi Everyone,

I have some data with me in excel format as sample

I need to display the sample data inside a table using API such that whenever i change the excel  Sample data with real data, the data is displayed on my table. The data is a collection of medical heades

My Queries-

Do i need to use Consume and expose data- ( both) based on the above mentioned requirement. If yes
What needs to be done first Consume or expose. Also what http methods should be used based on the requirement for each consume & Expose.

If No, Which API type consume/Expose should be used to achieve my above requirement?

Also if someone could mention links about the difference between Expose & Consume, it would be ideal

Attaching image of my table UI


REST - OutSystems refer this document for detailed Consume and Expose API

Regards,

Shahaji 





Hi @Shahaji Nangare , @Muhammed Riyas  , @Akshay Deshpande 🚀 , @Márcio Carvalho 

Created an expose rest using Get method to display data. Can you assist me with what should my next steps be with reference to consume.
Shall i use the URL path -
https://personal-kipqlvg9.outsystemscloud.com/Revmaxclaimsummarypage/rest/ClaimDetailsTable/GetAllClaimDetails

in the consume API (Upload link )

Revmaxclaimsummarypage (2).oml

RestExposeDemo (1).oml

Hello Saif,

If you want to consume one method you can use the link you shared:

https://personal-kipqlvg9.outsystemscloud.com/Revmaxclaimsummarypage/rest/ClaimDetailsTable/GetAllClaimDetails

If you want to consume all methods in this API use this link:

https://personal-kipqlvg9.outsystemscloud.com/Revmaxclaimsummarypage/rest/ClaimDetailsTable

Will use try and error by Consuming single method. the http method needs to be GET?
I have also used GET while exposing the API. Hence asking


Yes you have to use Get method, if you have used Get while exposing API

Hello Saif,

The basic concept of using API is Expose API and Consume API.

Both usages are different.

In a scenario where you want to share the data from Module A to another Module B,

Module A is the producer and Module B is the consumer of the data.

Here in Module A – you have to create an API to provide data to Module B, which means it exposes the data.

So, you will create an expose API in Module A.

As Module B is a consumer of the data, there you will create a Consume API to get the data from Expose API created in Module A.


Kind Regards,

Riyaz

Hello Saif,

You have to consider the following techniques while exposing services in Outsystemsin different scenarios.


Kind Regards, 

Riyaz


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.