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

How to retrieve Test Case via REST

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

0 votes



3 answers

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

0 votes


Permanent link

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

0 votes

Comments

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

Fantastic! Thank you, that solved it.


Permanent link

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 ?

0 votes

Comments

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.


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 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
× 10,938

Question asked: Oct 24 '13, 3:07 p.m.

Question was seen: 6,952 times

Last updated: Jun 19 '24, 12:06 p.m.

Confirmation Cancel Confirm