Creating artifact in different components in RQM using OSLC API (configuration management enabled)
Hello,
I am having trouble creating artifacts in different components of Project Area with configuration management enabled using the RQM OSLC API. I successfully create any kind of artifact in the initial component but I can't figure out how to create artifacts in other components of this Project Area.
My http request to the RQM OSLC API:
Method: POST
URL: https://RQM_HOST/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PA_UUID/testcase
Headers:
'oslc-core-version': '2.0'
'Accept': 'application/rdf+xml'
'Content-type': 'application/rdf+xml'
'X-Jazz-CSRF-Prevent': 'value_of_auth_cookie'
Body:
<?xml version='1.0' encoding='utf-8'?>
<ns0:testcase xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:ns0="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:oslc_config="http://open-services.net/ns/config#">
<dc:title>Title</dc:title>
<dc:description>Description</dc:description>
<ns0:weight>100</ns0:weight>
<ns0:category term="Safety Related" value="False" />
<ns0:category term="Security Related" value="True" />
<oslc_config:component rdf:resource="https://RQM_HOST/qm/oslc_config/resources/com.ibm.team.vvc.Component/Component_UUID" />
</ns0:testcase>
This works fine but always create the resource in the initial component. The <oslc_config:component> tag has no effect at all. I also tried with this one:
<oslc_config:component rdf:resource="https://RQM_HOST/qm/service/com.ibm.rqm.integration.service.IIntegrationService/resources/PA_UUID/component/Component_UUID" />
If you can tell me what I am missing...
Thanks.
4 answers
I believe you are mixing the ETM REST API as specified at https://jazz.net/wiki/bin/view/Main/RqmApi with the OSLC API as specified at https://jazz.net/wiki/bin/view/Main/RqmOslcQmV2Api and in the OSLC QM specification at https://open-services.net/specifications/.