Base URL for consumed REST services configurable at runtime

On our radar

The Base URL for consumed REST services should be configurable at runtime:

In some cases (like the JIRA Cloud REST api), the base URL of the web services varies according to the account used to access them. Since the URL is hard-coded in Service Studio (it can be overridden in ServiceCenter but the setting applies to all users accessing the REST api), there is currently no way to configure this based on the tenant being used or the user that logs in. 

Created on 24 Mar 2017
Comments (4)

Hi Adrian,

You can use the OnBeforeRequest to change the Base URL.

Even though the way I found for it to be dependent on an input variable feels like "cheating", it isn't that hard to achieve.

You can send the desired URL in a custom request header, then in the OnBeforeRequest action you can check for that header and change the URL based on the value.

Even though having it be simpler (or clearer) would be nice.

If the domain name is static (so it doesn't have a subdomain that is variable), you can use URL parameters to dynamically change the path. Also not very nice, but it works.

These 3 ideas are all hacky.  

Using a site property with a proper URL format makes the most sense.  

Everything is a lego block in outsystem, why not use allow Site Property to be used here

Changing the Base URL requires an extra prod-environmental 1 click publish

also what is the point of this screen in service center: I changed the effective URL it did nothing.