If you want to expose data to other systems to read it, you can do it using a REST API.

Typically, the steps you take are the following:

  1. Create the REST API service;
  2. Create the REST API method and design the logic to fetch data;
  3. Test the method.


We have an application to manage contacts and we want to allow other systems to get the list of contacts. We will expose a REST API method that allows getting the list of all contacts.

1. Create the REST API Service

To create the REST API service proceed as follows:

  1. Go to the Logic tab and expand the 'Integrations' folder;
  2. Right-click on 'REST', choose 'Expose REST API', and call it 'Contacts'.

2. Create the REST API Method and Design the Logic

To create the REST API method proceed as follows:

  1. Right-click on 'Contacts', choose 'Add REST API Method', and add the method 'GetContacts';
  2. Design the method as an action that returns a list of all contacts;
  3. Make sure the 'HTTP Method' property is set to 'GET'.

After deploying the application you have access to the following endpoint:

GET /ContactsAPI/rest/Contacts/GetContacts

The HTTP method and the URL is displayed in the properties of the method.

3. Test the Method

We've deployed the application to our environment in the public cloud. To test the method with curl, we use the following command:

curl https://osacademy.outsystemscloud.com/ContactsAPI/rest/Contacts/GetContacts

And the result is:

See Also

Allow Creating Data Using REST