How to add a Requirement link to a RQM testcase using Rest API
Hi,
I am trying to add oslc_qm:validatesRequirement (Requirementlinks) to a RQM test case. I am hitting this url https://server/rqm0001001/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_vjvTYgXaEea1H9WCwoPWVQ/testcase/urn:com.ibm.rqm:testcase:253.
The requestbody is
<?xml version="1.0" encoding="UTF-8"?><ns2:testcase xmlns:ns2="http://jazz.net/xmlns/alm/qm/v0.1/" xmlns:ns1="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns3="http://schema.ibm.com/vega/2008/" xmlns:ns4="http://purl.org/dc/elements/1.1/" xmlns:ns5="http://jazz.net/xmlns/prod/jazz/process/0.6/" xmlns:ns6="http://jazz.net/xmlns/alm/v0.1/" xmlns:ns7="http://purl.org/dc/terms/" xmlns:ns8="http://jazz.net/xmlns/alm/qm/v0.1/testscript/v0.1/" xmlns:ns9="http://jazz.net/xmlns/alm/qm/v0.1/executionworkitem/v0.1" xmlns:ns10="http://open-services.net/ns/core#" xmlns:ns11="http://open-services.net/ns/qm#" xmlns:ns12="http://jazz.net/xmlns/prod/jazz/rqm/process/1.0/" xmlns:ns13="http://www.w3.org/2002/07/owl#" xmlns:ns14="http://jazz.net/xmlns/alm/qm/qmadapter/v0.1" xmlns:ns15="http://jazz.net/xmlns/alm/qm/qmadapter/task/v0.1" xmlns:ns16="http://jazz.net/xmlns/alm/qm/v0.1/executionresult/v0.1" xmlns:ns17="http://jazz.net/xmlns/alm/qm/v0.1/catalog/v0.1" xmlns:ns18="http://jazz.net/xmlns/alm/qm/v0.1/tsl/v0.1/" xmlns:ns20="http://jazz.net/xmlns/alm/qm/styleinfo/v0.1/" xmlns:ns21="http://www.w3.org/1999/XSL/Transform"><ns4:identifier>https://rtc-test.intel.com/rqm0001001/service/com.ibm.rqm.integration.service.IIntegrationService/resources/_vjvTYgXaEea1H9WCwoPWVQ/testcase/urn:com.ibm.rqm:testcase:254</ns4:identifier><ns4:title>Test9</ns4:title> <ns1:Description> <ns11:validatesRequirement ns1:resource="https://dngserver/rrc/resources/_wX-wca_TEeat6Ob-AYwi2w"/></ns1:Description></ns2:testcase>
The title filed is gettong updated but the Requirements links are not.
Appreciate your help.
-Jyothi
Accepted answer
Looks like you're using the RQM Reportable REST API with a RQM OSLC API property (oslc_qm:validatesRequirement ). The RQM Reportable REST API does not support linking requirements to test artifacts (see https://jazz.net/wiki/bin/view/Main/RqmApi#Requirement). Instead, use the RQM OSLC API.