I want to update the test results of Cucumber test scenarios to QC ALM using Rest API. I have individual test-set for all automation test scenario (There is a 1-1 mapping between automation test scenario name and test-set name). So to get the test-set id for particular automation scenario, I am calling the rest API through Java.


while executing this above with get method, I am getting the below error:

qccore.general-errorIllegal query expression: must be surrounded with curly brackets

The GET method works fine, if I have query like this:


The ALM version is 11.52.536. Please help to solve this.

  • Try to amend singlequotes to doublequotes in your query.
    – Alexey R.
    Commented Sep 13, 2017 at 13:26
  • 1
    I believe the real case is not about "Test" name, there should be either whitespaces or some special characters vreaking the query grammar
    – Alexey R.
    Commented Sep 13, 2017 at 13:40
  • 1
    Hi Alex, I have tried that already (with single quote, double quote and without any quote. But every time getting the same error. Commented Sep 13, 2017 at 14:04
  • What is the exact value you're passing to the failing query?
    – Alexey R.
    Commented Sep 13, 2017 at 14:12
  • es-xxxx/qcbin/rest/domains/xxx/projects/ContentCreationPlatform/…{name["Sprint 2"]} Commented Sep 13, 2017 at 14:33

1 Answer 1


Pretty late, but if anybody needs this, the problem is with the URL encoding, use %20 instead of white spaces.

For example with "Sprint 2" the URL would be: http://xxxx/qcbin/rest/domains//projects//test-set-folders?query={name["Sprint%202"]} This also affects other special characters, like # (which is %23)

I use this page to verify those simbols: https://www.w3schools.com/tags/ref_urlencode.asp

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.