OutSystems Platform allows you to customize the URL of your REST APIs according to your needs.

To customize a URL, you need to do the following:

  1. Go to the REST API and select the method to display its properties;
  2. Customize the URL in property ‘URL Path’. Learn more about how it works.


In this example we have a Contacts application that exposes a REST API. Contacts are fetched using the following method and URL:

GET https://osacademy.outsystemscloud.com/Contacts/rest/ContactsAPI/GetContact?ContactId={ContactId}

Now, we want the URL to identify the collection ('Contacts') and the resource, as follows:

GET https://osacademy.outsystemscloud.com/Contacts/rest/ContactsAPI/Contacts/{ContactId}

To customize the URL, follow these steps:

  1. Expand the 'ContactsAPI' REST API and select method 'GetContact' to display its properties;
  2. Set property 'URL Path' to "/Contacts/{ContactId}".

Notice how the value in the 'URL' property changed.

Test Your Method

We've deployed the application to our environment in the public cloud.

To test the method, we use the following curl command:

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

And the response is:

See also

Expose Data Using REST | Exposed REST API Method Properties