Katalon Studio does not resolve ${GlobalVariable.api_gateway} in a REST Web Service request

Summary

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:

Illegal character in path at index 1

Steps to reproduce

  1. Open the Katalon Studio project.

  2. Open the execution profile:

    Profiles/DJPB CR

  3. Define the following global variable:

    api_gateway = https://example.com

  4. Open the REST request object:

    Object Repository/API/Postman/Request.rs

  5. Configure the request URL as:

    ${GlobalVariable.api_gateway}/mdm/firm-master/271?state=default

  6. Execute the request through a Katalon test case using the DJPB CR execution profile.

  7. Observe the error popup.

Expected Results

Katalon Studio should resolve:

${GlobalVariable.api_gateway}

to:

https://example.com

and send this final request:
https://example.com/mdm/firm-master/271?state=default

Actual Results

Katalon then fails while parsing the URI and shows an error similar to:

Illegal character in path at index 1

The same request works when the URL is replaced with the literal endpoint:

https://example.com/mdm/firm-master/271?state=default

Screenshots / Videos

Please attach:

  1. Screenshot of Profiles/DJPB CR.glbl showing the api_gateway variable.

  2. Screenshot of the REST request URL containing ${GlobalVariable.api_gateway}.

  3. Screenshot of the execution error popup.

  4. 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.

Operating System

Windows 11

Katalon Studio version

Katalon Studio11.4.0

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.

Could you show us the source code of your “Katalon test case” ?

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

I wrote a Katalon test case as follows:

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.testobject.RequestObject
import com.kms.katalon.core.testobject.ResponseObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS

RequestObject request = (RequestObject)findTestObject("Object Repository/API/Postman/Request")
println "request.getUrl() returned ${request.getUrl()}"

ResponseObject response = WS.sendRequest(request)

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 &#x200B; or &#8203;. 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 have ever seen an issue concerning UNICODE code point 8203 previously.

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

So the way of declaring the globalvariabl in the test object of API is the issue

I made a test case script:

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:

${GlobalVariable.api_gateway}/mdm/firm-master/271?state=default

Can you see that the dollar sign is a bit wider than usual $

I pasted this URL string into the Test Object, and click the green arrow button;

As you see, the popup said “Illegal character in path at index 1”. The original problem was reproduced! or not?

Another trial:

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()

This gave me a popup that says “index 2”.

Hmm, this is a bug in the latest version Katalon @nghi.phan

Earlier I was reproducing this with the older version so I didn’t get that illegal character issue

But with the latest version katalon i.e. 11.4.0 , there is an issue, with the API

I have created a support ticket for your issue. We wil provide upates once we have more information

I was wrong. v11.3.0 has no problem. but v11.4.0 has an issue.

I could reproduce the issue raised by moonlayTech using v11.4.0 and v11.5.0.

I confirmed that v11.3.0 works fine.

Yes, you are right, this issue is present in only version 11.4.0, and prior versions are clean

Thanks Bella,

Issue even persists in the latest version 11.5.0

I wrote a Test Case script as follows:

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.testobject.RequestObject
import com.kms.katalon.core.testobject.ResponseObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS

RequestObject request = (RequestObject)findTestObject("Object Repository/API/Postman/Request")
println "request.getUrl() returned ${request.getUrl()}"

ResponseObject response = WS.sendRequest(request)

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
run_katalon_test 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.