How to create a 'implemented by' link in a requirement of rrc with rest api
One answer
Hi,
It can be done by doing an OSLC GET to the RM artifact, then add following to the response body:
<rdf:RDF
.
.
.
<rdf:Description rdf:about="">
.
.
<oslc_rm:implementedBy rdf:ID="n0" rdf:resource="URL_TO_THE_RTC_ARTIFACT"/>
.
.
</rdf:Description>
<rdf:Description rdf:about="#n0">
<dc:title rdf:parseType="Literal">LINK_NAME</dc:title>
</rdf:Description>
</rdf:RDF>
and do an OSLC PUT to the RM artifact with that information.
On the GET use following Headers:
accept=application/rdf+xml
OSLC_Core_version=2.0
On the PUT use above Headers plus:
If-Match="Use the etag Header value returned on the OSLC GET"
It can be done by doing an OSLC GET to the RM artifact, then add following to the response body:
<rdf:RDF
.
.
.
<rdf:Description rdf:about="">
.
.
<oslc_rm:implementedBy rdf:ID="n0" rdf:resource="URL_TO_THE_RTC_ARTIFACT"/>
.
.
</rdf:Description>
<rdf:Description rdf:about="#n0">
<dc:title rdf:parseType="Literal">LINK_NAME</dc:title>
</rdf:Description>
</rdf:RDF>
and do an OSLC PUT to the RM artifact with that information.
On the GET use following Headers:
accept=application/rdf+xml
OSLC_Core_version=2.0
On the PUT use above Headers plus:
If-Match="Use the etag Header value returned on the OSLC GET"