It's all about the answers!

Ask a question

How to retrieve Test Case via REST


helene højrup (231912) | asked Oct 24 '13, 3:07 p.m.
Hi all
How do I retrieve a TC via rest when I have a uri like this:
https://server:9443/jazz/oslc_qm/contexts/_Cbq2sKfcEeCjLZ6OPOYtFw/resources/com.ibm.rqm.planning.VersionedTestCase

I've tried to add this to seach for the oslc:shortId
?oslc.where=oslc%3AshortId%3D%2271%22

3 answers



permanent link
Paul Slauenwhite (8.4k12) | answered Oct 25 '13, 7:04 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
Hi Helene,

This URL is for the OSLC QM V2 API in RQM 3.0+ (see https://jazz.net/wiki/bin/view/Main/RqmOslcQmV2Api).  This format of the URL will return a paged feed of test cases.  To GET a specific test case, you would need to know the test case UUID (see the dcterms:identifier property of the test case) or query one of the queryable test case properties (see http://open-services.net/bin/view/Main/QmSpecificationV2?sortcol=table;up=#Resource_TestCase).

To get started, see https://jazz.net/wiki/bin/view/Main/RqmOslcQmV2Api#Getting_Started.

permanent link
helene højrup (231912) | answered Oct 25 '13, 9:57 a.m.

Hi Paul

Thank you for your answer.

When you say "query one of the queryable test case properties" what does that exactly mean? I've tried to add something like this to my url

&oslc.prefix=dcterms=<http://purl.org/dc/terms/>&oslc.selec=*&oslc.where=dcterms:identifier=71

but it doesn't work. As fare as I can understand, then the com.ibm.rqm.planning.VersionedTestCase belongs to the oslc interface while urn:com.ibm.rqm:testcase has something to do with the REST. I have tried to write my url to fit something like this https://localhost:9443/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/JKE+Banking+%28Quality+Management%29/testcase/urn:com.ibm.rqm:testcase:32 but that doesn't work either.

I will take a further look into the links you send me, but I'm not good at understanding all this...


Comments
Paul Slauenwhite commented Oct 25 '13, 10:29 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

There are two public RQM APIs:

RQM OSLC API
RQM Reportable REST API

To get test case #32 using the RQM OSLC API:

Request:
GET https://<host>:<port>/<context root>/oslc_qm/contexts/<project area UUID>/resources/com.ibm.rqm.planning.VersionedTestCase?oslc.where=oslc:shortId="32"

Headers:
OSLC-Core-Version = 2.0
Accept = application/xml

To get test case #32 using the RQM Reportable REST API:

Request:
GET https://<host>:<port>/<context root>/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<project area alias>/testcase/urn:com.ibm.rqm:testcase:32?abbreviate=false

Headers:
Accept = application/xml


helene højrup commented Oct 25 '13, 12:59 p.m.

Fantastic! Thank you, that solved it.


permanent link
David Akehurst (92) | answered Jun 17, 10:33 a.m.

Hi,
Related to this:
I have used the Reportable Rest API to fetch XML about testcases.
Each '<entry>....</entry> (Testcase) contains information about the test case as expected.

There is an '<identifier> element that provides a URL (I assume an OSLC identifier as I used oslclinks=true).

For the same project, but different components/streams
Some of the URLs returned in this identifier can be used to browse to the Testcase in the web view.
But some cannot - they result in an error
"Error
AQXCM5008E The operation cannot be completed because the resource, http://....., was not found."

Why would some of the URLs be browsable, but some not ?


Comments
Ian Barnard commented Jun 19, 11:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Hi David - don't ask a question as an answer to another question: create your own new question perhaps with a link to this topic.



Ralph Schoon commented Jun 19, 12:06 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

And provide examples e.g. how the URI's look like.
The reportable REST API is not an OSLC API. FYI

Your answer


Register or 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.