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

How can I get the module related to a requiment artifact, using OSLC in IBM Doors NG ?

Hi,

 We can fetch all desirible requirements using a OSLC query in IBM Doors NG, like this:

 For each requirement artifact, I would like to know the module that contains it.

 How can I get the module related to a requiment artifact, by OSLC ?

Thanks !

0 votes


Accepted answer

Permanent link

Hi Carlo


Technically speaking, core artifacts are never "in" modules, but they can be used in one or more modules, so what you're asking should correctly be stated as something like "Which modules use this artifact?".

Using OSLC Query:

That said, I don't think there's a direct way to find this out using OSLC query, but maybe you can try:
1. get the uris of selected/all modules you're interested in, e.g. using an OSLC query like oslc.where=rdf:type=oslc_rm:RequirementCollection or oslc.where=rdm_types:ArtifactFormat=jazz_rm:Module
2. for each module GET from the module URI with headers OSLC-Core-Version=2.0 and Accept=application/rdf+xml and in the RDF there are entries oslc_rm:uses for each "used" artifact
3. now GET from each of these artifacts (using the same headers) to find the id or any other info you need

Using Reportable REST:

The reportable REST API can give you the content of a module using a query like:
 https://SERVER:PORT/rm/publish/resources?moduleURI=_c1cm0L3VEeCPFbe791FOoQ 

replace the module URI with your module URI.

To work in a configuration-managed project add a configu URL like

 https://SERVER:PORT/rm/publish/resources?moduleURI=_c1cm0L3VEeCPFbe791FOoQ&oslc_config.context=https://SERVER:PORT/rm/cm/stream/_XYZ

replace _XYZ with the URI of your configuration.




HTH
Ian

Carlo Moura selected this answer as the correct answer

0 votes

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,927
× 515
× 46
× 25

Question asked: Sep 15 '21, 5:32 p.m.

Question was seen: 1,167 times

Last updated: Sep 20 '21, 12:31 p.m.

Confirmation Cancel Confirm