Skip to main content

How to use Query Parameters in Service Suite?


You can construct the URL of the endpoint using javascript string concatenation expressions that can include variables. So for example in the following snippet, the variable $clientNumber is used in the query part of the URL of a GET call. Also adding a query parameter “_” to use as a cache buster with the current epoch time number.

var $clientNumber = getLoggedClientNumber();  // or can be read from a CSV file
var $url = $server + “/common/getClientData/?clientNumber=“+ $clientNumber +”?_”+Date.now();
var $response = get($url);
var $json = JSON.parse($response.getDataString());
var $clientNumber = $json.clientNumber;

Last updated: March 21, 2023

If you have any feedback on this topic, please contact us at documentation@appvance.ai