Using gs.getProperty("glide.servlet.uri") in Connection URL Builder

TCole94
Tera Expert

For an ongoing integration, the connection url must have the following format (below)

https://<instance name>/api/now/table

 

Question: Is it possible to use gs.getProperty("glide.servlet.uri") in the place of "https://<instance name>/"? 

This would be primarily due to having the url connection stay relative due to it's presence in sub-production instances as well. 

1 REPLY 1

Tony Chatfield1
Kilo Patron

Hi, you should be able to assign gs.getProperty("glide.servlet.uri")  to a variable
or include it in your code directly

var myInstance = gs.getProperty("glide.servlet.uri");
var myUrl = myInstance + 'api/now/' + myTable;

or
var myURL = gs.getProperty("glide.servlet.uri") + 'api/now/' + myTable;