How to create link of type parent of(child of) through OSLC rest API in DOORS NG 6.0
![]() We have a requirement where in we need to create link on requirement such as parent of(child of) through OSLC rest API. This article (https://jazz.net/library/article/1197) on explain link which are defined in OSLC Spec.
Kindly guide me to any article or sample way to create a link through rest api java client.
|
One answer
![]() Normally in order to create links like Implemented By or Validated By you would do a OSLC get to the artiafct that's going to contain the link and then add an entry in the rdf metadata of the artifact like this
<oslc_rm:implementedBy rdf:resource="https://server.com:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/15"/>
and then do a OSLC PUT to create the link. That's to links to other apps like ccm or qm
But for DNG's internal owned links like Parent Of i think you can do a PUT to the links service with some metadata like this
<rdf:RDF xmlns:rm="http://www.ibm.com/xmlns/rdm/rdf/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rm:Link rdf:about="">
<rdf:subject rdf:resource="https://server.com:9443/rm/resources/_96LY8c25Eeqwcvow_3iP0g"/>
<rdf:object rdf:resource="https://server.com:9443/rm/resources/_B0B_Yc26Eeqwcvow_3iP0g"/>
<rdf:predicate rdf:resource="https://server.com:9443/rm/types/_UUfbgcuZEeq5bK5No7zeYA"/>
<rdf:type rdf:resource="http://www.ibm.com/xmlns/rdm/rdf/Link"/>
<rdf:value rdf:datatype="http://www.w3.org/2001/XMLSchema#string"></rdf:value>
<rm:hasAttrVal rdf:parseType="Resource">
<rm:hasAttrDef rdf:resource="https://server.com:9443/rm/types/_UVmOwsuZEeq5bK5No7zeYA"/>
<rdf:value>739</rdf:value>
</rm:hasAttrVal>
</rm:Link>
</rdf:RDF>
you can open the developer's tools in your browser and create a link in the DNG UI to see the headers passed to the request.
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.