Is there a way to get all test artifacts for specific GC stream with only GC URI context as parameter or Header using OSLC api?
https://server/qm/oslc_qm/contexts/processAreaUUID/resources/com.ibm.rqm.planning.VersionedTestPlan?oslc_config.context=localStreamUUID along with
localStreamUUID ?
We are expecting something like below :
https://server/qm/oslc_qm/contexts/processAreaUUID/resources/com.ibm.rqm.planning.VersionedTestPlan?oslc_config.context=https://server/gc/configuration/361
One answer
Requests may either include a
oslc_config.context
parameter or a
Configuration-Context
header. The OSLC Configuration Management specification at https://docs.oasis-open-projects.org/oslc-op/config/v1.0/psd01/config-resources.html#configcontext says:
A server MUST support both these methods of passing configuration context. [CONFIG-RES-82]
If a request contains both a header and a query string, the server MUST use the query string. Servers MUST reject requests that contain two or more different configuration contexts passed in query strings. [CONFIG-RES-83]
oslc_config.context
should be a URL encoded URI of a configuration. Specifying just some UUID is not valid usage according to the OSLC Configuration Management specification. Since you specified both a query string and a header, the query string should be used, and the header value ignored.
Assuming that https://server/gc/configuration/361 is a correct GC URI, then
https://rb-alm-11-p.de.bosch.com/qm/oslc_qm/contexts/_JcxK8FtpEemmsaDgWtsYZQ/resources/com.ibm.rqm.planning.VersionedTestPlan?oslc_config.context=https%3A%2F%2Fserver%2Fgc%2Fconfiguration%2F361
should work. OSLC compliant servers must accept URIs of global configurations and local configurations. If ETM does not, that would be an ETM defect.
Best regards,
David
Comments
https://rb-alm-11-p.de.bosch.com/qm/oslc_qm/contexts/_JcxK8FtpEemmsaDgWtsYZQ/resources/com.ibm.rqm.planning.VersionedTestPlan?oslc_config.context=https%3A%2F%2Fserver%2Fgc%2Fconfiguration%2F361
But it did not give any response, only after we used localstreamcontext we were able to fetch all artifacts.
If the GC you specified includes that local ETM configuration as a recursive contribution, that sounds like an ETM defect, and raising a ticket with IBM support is the best way forwards.
BTW, I assume that the URI are accessing is an OSLC query base that you discovered from an OSLC Query Capability through the OSLC Service Provider Catalog. If not, that REST service might not be an OSLC one, but an ETM proprietary one, and you might like to try using an OSLC query capability instead.