It's all about the answers!

Ask a question

OSLC api formation for Configuration managemnet enabled Project Area


Rajat Krishnan (722223) | asked Nov 27 '21, 7:55 a.m.
edited Nov 27 '21, 8:05 a.m.
Hello,
I need small help w.r.t oslc api for Configuration Management enabled Project Area,
Now i want to retrieve test plan id 2 details like linked test cases and tcer , what shall be my oslc api formation?
Lets say II have below configuration for my project area
Project Area name : Electronics_QM(uuid : _hrh43kfne3irj3r8)

Component name : tools.electronics (uuid : _we56dgrtf2435g)

Currently i am passing something like

https://local host/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Electronics_QM/testplan?fields=feed/entry/content/testplan/[id=2]

But above url gives me list of test cases which is not even linked with test plan 2,
Now below are my queries :
  1. What shall be my oslc api formation inorder to get the list of test cases & tcer which linked with test plan 2 (created under component called tools.electronics)
  2. Also i found oslc_config.context may i know what is this? is it component uuid or stream name ?

Thanks in advance !!

5 answers



permanent link
David Honey (1.8k17) | answered Nov 29 '21, 5:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

As described in the OSLC specification https://oslc-op.github.io/oslc-specs/specs/config/oslc-config-mgt.html, the oslc_config.context parameter value is a URI (not a UUID).


permanent link
Ian Barnard (2.3k714) | answered Nov 29 '21, 5:54 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

 Hi



Two things:
1. This API is not an OSLC API, it is the Reportable REST API for ETM, see https://jazz.net/wiki/bin/view/Main/RqmOslcQmV2Api
2. AFAICT it isn't possible to filter the feed by id - you can filter on title as shown in my answer linked above, and by a number of other fields but not id.

So to filter on title and show all links to test cases:
https://SERVER:PORT/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/<Project Alias>/testplan?fields=feed/entry/content/testplan[title='Development Test']/testcase

Or don't bother getting the Reportable REST API to filter and instead search the result XML for the test plan id you want?


permanent link
Geoffrey Clemm (30.1k33035) | answered Nov 27 '21, 10:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

When you say "test plan id 2", you are effectively identifying a "concept ID" for an artifact.   If you have not activated configuration management for a project area, there will be exactly one artifact with that concept ID.  When you activate configuration management for a project area, that means that you can "branch" an artifact, to create a new artifact that has the same "concept ID" as the original.  (Note: You branch artifacts with the "create stream" operation ... each time you create a new stream, you branch all the artifacts in that stream.) This means that when configuration management is activated, a request for the properties for a given artifact Concept ID is ambiguous.   To disambiguate the request, you have to specify the oslc_config.context, which specifies the configuration (stream or baseline) in which to lookup the "concept ID".  


Comments
Rajat Krishnan commented Nov 27 '21, 11:09 a.m.
Hello @Geoffrey Clemm,
Thanks for addressing my query , but i am really confused where exactly i need to place oslc_config.context in my url ?
I was referring this blog Cheat Sheet which has some sample oslc + REST api example but since there is no example for configuration enabled project area so i am confused(i am new to this) , i am not very sure about concept id but when i say test plan id i meant artifact id i.e viewTestPlan&id=2 (which you can get from url address when you open test plan 2 in RQM GUI)

Thank you

Geoffrey Clemm commented Nov 27 '21, 11:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

To understand how to use the API with a project area that has configuration management enabled, I recommend reading over the OSLC specification: https://oslc-op.github.io/oslc-specs/specs/config/oslc-config-mgt.html


In particular, for adding in the configuration information, you can use either an HTTP header or add a query string.  For details, see: https://oslc-op.github.io/oslc-specs/specs/config/config-resources.html#configcontext
 


permanent link
Rajat Krishnan (722223) | answered Nov 28 '21, 10:17 a.m.
Thanks for response , but i found a way out to where exactly "oslc_config.context" will fit under my url
https://rb-alm-04-q.de.bosch.com/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Project Area UUID/testplan/urn:com.ibm.rqm:testplan:2?oslc_config.context=Local Configuration UUID

But here comes my next query that still i am not able to get linked test cases id(under response body) which linked with testplan id 2

permanent link
Rajat Krishnan (722223) | answered Nov 29 '21, 8:33 a.m.
Thanks , now i got the context , but i have one doubt ,actually when i am hitting this url :
https://local host/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/Project Area UUID/testscript/urn:com.ibm.rqm:testscript:4480?oslc_config.context=_HSUUcFLhEeqsrkllklk
  • I am getting response body which contains almost all the information/tags like Creator,Team Area, but only one field which is missing is Test Data, somehow under response xml file, tag for test Data is missing
  • Is there any reason that some field present in RQM test script GUI will not show in response?
Thank you

Comments
Ian Barnard commented Nov 29 '21, 9:10 a.m. | edited Nov 29 '21, 9:11 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You've created another answer - you should either make this a comment Just below my answer by clicking the link 'Comment on this answer', or perhaps update your question.


 field which is missing is Test Data
some field present in RQM test script GUI will not show in response

You need an RQM expert to answer that question, which I'm not. Might be best to ask a whole new question.

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.