Hi,
I'm new here and I have problems to correctly escape the special characters (" and ') in the queries.
My goal is to get the id of the test-set-folder, given it's name and the id of the parent. For Folders without quotes this works fine as:
http://<server>/qcbin/rest/domains/<>/projects/<>/test-set-folders?query={name["test"];parent-id['3461']}&fields=id
But the trouble comes with the following folders, which are all in the same parent-folder:
- test'single
- test"double
- test'2'single
- test"2"double
- test"2'both
I was not able to find a solution for those with only one quotation mark.
.../test-set-folders?query={name["test'single"];parent-id['3461']}&fields=id,name
gives the error:
Invalid expression ["test'single"];parent-id['3461']. Message: literal '];parent-id[' is illegal
Exception Id: qccore.invalid-filter-expression
simillarly for .../test-set-folders?query={name["test\"double"];parent-id['3461']}&fields=id,name
Invalid expression ["test\"double"];parent-id['3461']. Message: literal '];parent-id[' is illegalException Id: qccore.invalid-filter-expression
Surprisingly the ones with 2 quotation marks work by using " at the beginning and end:
- .../test-set-folders?query={name["test'2'single"];parent-id['3461']}&fields=id,name
- .../test-set-folders?query={name["test\"2\"double"];parent-id['3461']}&fields=id,name
- .../test-set-folders?query={name["test\"2'both"];parent-id['3461']}&fields=id,name
Has anyone an idea how to proceed to get the id's of folders with one quotation mark in their name?
Thank You
andrin