DOORS Next Gen Query API
I'm trying to perform requirement queries that aren't supported/exposed by the OSLC Query Capabilities (like querying by module), and I came across what seems to be a DNG-specific querying endpoint (https://<server>/rm/views on our host). Trying to POST to this endpoint requires a DoorsRP-Request-Type of "private" and uses some sort of XML-based query language. What does the private header mean? Is this endpoint/query language documented? How can we use this seemingly-more-powerful query capability?
If we can't use this endpoint easily/effectively, what other options do we have? How can we query only artifacts that exist in a given module (without having to download each one individually from the module structure)?
2 answers
Modules are exposed as Collections in the OSLC Query API, and any artefacts inside are returned by querying the 'uses' relationship on the Module.
So if you are looking for artifacts inside a Module, use something like this to get the Project:
https://<your server>/rm/views?oslc.query=true&projectURL=<your project URI>
followed by:
&oslc.prefix=oslc_rm=<http://open-services.net/ns/rm%23>&oslc.prefix=dcterms=<http://purl.org/dc/terms/>&oslc.select=oslc_rm:uses&oslc.where=dcterms:title="<your module name>"
or even
oslc.where=dcterms:identifier=<the module ID>
As per the OSLC RM 2.0 spec, the OSLC 'uses' field will return the URIs of all the artefacts used inside the module, which you can then use for further queries. If you're just looking for basic info from the contained artefacts, you can request specific fields with:
&oslc.select=oslc_rm:uses%7Bdcterms:title%7D,oslc_rm:uses%7Bdcterms:identifier%7D
which will pull out the ID and Title of the contained artefacts.This article is a useful resource for this: https://jazz.net/library/article/1197
Comments
1 vote