It's all about the answers!

Ask a question

Can we fetch only artifacts of system requirement type using OSLC?

G C (452) | asked Nov 25, 1:47 a.m.

 Can we fetch only artifacts of system requirement type using OSLC?

One answer

permanent link
Ian Barnard (950612) | answered Nov 25, 4:43 a.m.
edited Nov 25, 5:32 a.m.


Yes - using OSLC Query you can retrieve resources of a particular artifact type, or do more complex queries. 

This article gives a useful overview of how to use the OSLC APIs of DOORS Next, and has some search examples under the heading Using the query capabilities 

So you'd specify (appropriately encoded):

  • oslc.where=oslc:instanceShape=<URI of Stakeholder Requirement shape>

For example:

Which is encoded in the URL (along with other OSLC query parameters like, oslc.prefix) as:

  • &
You can discover the shape URI from the component+configuration services.xml, which is part of the discovery sequence where you also find the query capability for oslc_rm:Requirement.

If you want a working example of using OSLC Query, which you can also modify/adapt/extend if you want to, and you're able to use Python then there is an open source example of command-line OSLC Query (among other things) here also installable using pip install elmclient - full disclosure, I'm the author :-) Using the oslcquery command from this package means you don't have to worry about assembling the complex URL of the query, and you can specify your query on the command line using the name of the type like -q "oslc:instanceShape='Stakeholder Requirement'"


Your answer

Register or to post your answer.