REST API @href Syntax Error
Hi All
I try to execute a query to get all the test execution results from a test plan.
According to
https://jazz.net/forum/questions/179391/rest-api-show-last-execution-result-for-test-cases-in-a-test-plan
and
https://jazz.net/wiki/bin/view/Main/RqmApi#fields
the syntax of my query seems to be OK:
java.exe -jar RQMUrlUtility.jar -command GET -user <user> -password <pwd> -filepath output.xml -url https://<server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/executionresult?fields=feed/entry/content/executionresult/(*|testplan[@href='https://<server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testplan/urn:com.ibm.rqm:testplan:668?revision=419'])
I'm receiving an error saying that "testplan[@href" is incorrect.
I also tried to re-use the example from the Wiki:
Thanks a lot in advance
I try to execute a query to get all the test execution results from a test plan.
According to
https://jazz.net/forum/questions/179391/rest-api-show-last-execution-result-for-test-cases-in-a-test-plan
and
https://jazz.net/wiki/bin/view/Main/RqmApi#fields
the syntax of my query seems to be OK:
java.exe -jar RQMUrlUtility.jar -command GET -user <user> -password <pwd> -filepath output.xml -url https://<server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/executionresult?fields=feed/entry/content/executionresult/(*|testplan[@href='https://<server>/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project>/testplan/urn:com.ibm.rqm:testplan:668?revision=419'])
I'm receiving an error saying that "testplan[@href" is incorrect.
I also tried to re-use the example from the Wiki:
<feedUrl>?fields=feed/entry/content/testplan[title='test plan title']/(*|testcase[@href=' <resourceUrl>'])
and got the same error "testcase[@href" incorrect
.
Could you please help me out with this issue?
I'm using RQMUrlUtil-6.0.2. Due to our IT security settings I could not test with HTTP-Requester
Thanks a lot in advance
Accepted answer
You made it sound like there is something wrong with the REST API syntax, but it is not. I have to run it myself to understand what you tried to say. The error is (when running on Windows)
'testplan[@href' is not recognized as an internal or external command, operable program or batch file.This is because the command shell takes the pipe sign (|) and believes the part after it is another command, hence the complain. To resolve it, you need to quote the entire URL string. As you are using single quotes within the URL, you can simply use double quotes to surround the URL. If you use double quotes within the URL, you need to escape them (use \" to replace ") first.