0

I am trying to use HP ALM 11's REST API. So far I have been able to query stuff fine. Now I have hit a case where the name of the entity (a test folder) is with spaces: "WebView - New Thin UI"

{name['WebView - New Thin UI']}

If I specify the query like {name['WebView*']} it returns a bunch of test folders among which is also the one mentioned above.

However, if I use the full name including the spaces (The string gets escaped and spaces converted to +. I can see GET /qcbin/rest/domains/XXX/projects/XXX/test-folders?query=%7Bname%5B%27WebView+-+New+Thin+UI%27%5D%7D&page-size=max&start-index=1 HTTP/1.1 in the logs) I get no results (empty set, not an error).

I do not see how else I should specify the query criterion so that it would work.

wilx
  • 17,697
  • 6
  • 59
  • 114

1 Answers1

2

Use double quotes instead of single quotes.

Following query works fine with my instance and returns single record.

http://hp.gaurav.com:8080/qcbin/rest/domains/DEFAULT/projects/TestProject/defects?query={name[="Sample query test"]}

Gaurav
  • 811
  • 9
  • 21
  • Is the `=` before the `"Sample query test"` necessary? I think that might be what I am missing. I have already tried double quotes. I will try this later today. – wilx Apr 28 '15 at 07:47