Katalon Studio does not resolve ${GlobalVariable.api_gateway} in a REST Web Service request when executing the request with the DJPB CR execution profile.
The global variable api_gateway exists in:
Profiles/DJPB CR.glbl
However, during execution Katalon attempts to parse the unresolved expression as part of the URL and displays an error popup similar to:
Optional execution log showing the unresolved URL.
java.lang.IllegalArgumentException: Illegal character in path at index 1: ${GlobalVariable.api_gateway}/mdm/firm-master/271?state=default
at com.kms.katalon.core.webservice.common.DefaultHttpRequest.<init>(DefaultHttpRequest.java:14)
at com.kms.katalon.core.webservice.common.RestfulClient.buildHttpRequest(RestfulClient.java:29)
at com.kms.katalon.core.webservice.common.RestfulClient.buildHttpRequest(RestfulClient.java:1)
at com.kms.katalon.core.webservice.common.BasicRequestor.send(BasicRequestor.java:53)
at com.kms.katalon.controller.WebServiceController.sendRequest(WebServiceController.java:182)
at com.kms.katalon.composer.webservice.parts.RestServicePart$9.run(RestServicePart.java:352)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:123)
Caused by: java.net.URISyntaxException: Illegal character in path at index 1: ${GlobalVariable.api_gateway}/mdm/firm-master/271?state=default
... 7 more
Sensitive information: Mask or remove bearer tokens, account credentials, and other secrets before attaching files.
Blocker?
Yes.
The API test cannot execute using environment-specific URLs stored in the DJPB CR execution profile.
THis is not really "Katalon fails to resolve profile variables". Katalon API works differently than the Postman.
Here the API test object you created is good, however you need to pass this object via the actual execution pipeline (WS.sendRequest inside a Test Case run)
Because the error you are getting ( I highlighted above) → RestServicePart is the internal class behind the “Send” / “Test” button inside the Web Service Request object’s editor (the composer UI where you build/preview the .rs object) — not TestCaseExecutor, which is what runs when you execute an actual Test Case.
So solution is to use WS.sendRequest(findTestObject(...)) in the script, select the profile before execution, it will work.
I tried to reproduce what you, @moonlayTech, saw but I couldn’t.
I created the Execution Profile DJPB CR with a GlobalVariable api_gateway as you described. I created a Test Object Object Repository/API/Postman/Request as you described as well. I configured the request URL as
When I ran this with the Execution Profile “DJPB CR”, I got the following output in the console:
2026-08-18 17:03:15.805 INFO c.k.katalon.core.main.TestCaseExecutor - --------------------
2026-08-18 17:03:15.805 INFO c.k.katalon.core.main.TestCaseExecutor - START Test Cases/TC1
2026-08-18 17:03:16.018 DEBUG testcase.TC1 - 1: request = findTestObject("Object Repository/API/Postman/Request")
2026-08-18 17:03:16.093 DEBUG testcase.TC1 - 2: println(request.getUrl() returned $request.getUrl())
request.getUrl() returned https://example.com/mdm/firm-master/271?state=default
2026-08-18 17:03:16.102 DEBUG testcase.TC1 - 3: response = sendRequest(request)
2026-08-18 17:03:16.476 INFO c.k.k.core.webservice.common.HarLogger - HAR: /var/folders/l9/hl8jlph969j5hq37_69l6_lm0000gn/T/Katalon/Test Cases/TC1/20260818_170314/requests/main/Request_0.har
2026-08-18 17:03:16.478 INFO c.k.k.core.webservice.common.HarLogger - cURL Command:\ncurl \\n --location \\n 'https://example.com/mdm/firm-master/271?state=default'
2026-08-18 17:03:16.504 INFO c.k.katalon.core.main.TestCaseExecutor - END Test Cases/TC1
I could see the request.getUrl() returned a string https://example.com/mdm/firm-master/271?state=default.
This proves that the given URL string ${GlobalVariable.api_gateway}/mdm/firm-master/271?state=default was processed successfully. The placeholder ${GlobalVariable.api_gateway} was successfully interpolated with a string https://example.com.
I did not observe any error popup.
So I couldn’t reproduce the moonlayTech’s problem.
I used Katalon Studio v11.3.0. I believe that v11.4.0 would work the same.
I suspect that there is an invisible zero-width whitespace character in between $ and { at the index 1 of this string. If that is the case, it explains the issue of “Illegal character in path at index 1” completely.
What is “invisible zero-width whatespace character” ? — U+200B or 8203 in decimal. In HTML, it is coded as ​ or ​. See
@moonlayTech can copy the URL string and paste it into a text file; and open the file with a HEX editor. They might be able to see what’s in between $ and {.
I would suggest @moonlayTech to erase the URL string once; and retype the string carefully without malicious characters.
I am calling the global variable similarly and it is working for me. Only difference I can see in my case of that - I am not using the https:// in the profile, but using the https:// while I am declaring it in the test object
StringBuilder sb = new StringBuilder()
sb.append('\uFF04') // FULL-WIDTH DOLLAR SIGN
sb.append('{GlobalVariable.api_gateway}/mdm/firm-master/271?state=default')
File f = new File('./url.txt')
f.text = sb.toString()
I ran this and got the url.txt file with the following string:
StringBuilder sb = new StringBuilder()
sb.append('\uFEFF') // Byte Order Mark
sb.append('${GlobalVariable.api_gateway}/mdm/firm-master/271?state=default')
File f = new File('./url.txt')
f.text = sb.toString()
When I ran this using v11.4.0, the script ran fine. The placeholder string the placeholder ${GlobalVariable.api_gateway} was interpolated to the value https://example.com.
On the other hand, using the same v11.4.0, I opened the Test Object “Object Repository/API/Postman/Request” and clicked the button to run a request. Then the error occured.
Clicking the Detals>> button in the dialog revealed the stack trace as follows:
java.lang.IllegalArgumentException: Illegal character in path at index 1: ${GlobalVariable.api_gateway}/mdm/firm-master/271?state=default
at com.kms.katalon.core.webservice.common.DefaultHttpRequest.<init>(DefaultHttpRequest.java:14)
at com.kms.katalon.core.webservice.common.RestfulClient.buildHttpRequest(RestfulClient.java:29)
at com.kms.katalon.core.webservice.common.RestfulClient.buildHttpRequest(RestfulClient.java:1)
at com.kms.katalon.core.webservice.common.BasicRequestor.send(BasicRequestor.java:53)
at com.kms.katalon.controller.WebServiceController.sendRequest(WebServiceController.java:182)
at com.kms.katalon.composer.webservice.parts.RestServicePart$9.run(RestServicePart.java:352)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:123)
Caused by: java.net.URISyntaxException: Illegal character in path at index 1: ${GlobalVariable.api_gateway}/mdm/firm-master/271?state=default
... 7 more
I suppose that com.kms.katalon.controller.WebServiceController.sendRequest(WebServiceController.java:182)failed to interpolate the placeholder ${GlobalVariable.api_gateway} to the value https://example.com.