Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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:
<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

0 votes


Accepted answer

Permanent link
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.

Gabor Federics selected this answer as the correct answer

0 votes

Comments

Ohh, that was a dumm mistake, I didn't think about it

Thanks for your help Donald!

Well, not dumb really. It can happen to anybody, anytime. :-)

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 480
× 137

Question asked: Dec 12 '16, 11:55 a.m.

Question was seen: 2,471 times

Last updated: Dec 13 '16, 7:21 p.m.

Confirmation Cancel Confirm