It's all about the answers!

Ask a question

How to create a 'implemented by' link in a requirement of rrc with rest api


benjamin oh (144) | asked Sep 25 '12, 1:47 a.m.
Hi !

Is there any sample code about rrc link creation with rest api ?
I don't know how to create a 'implemented by' link in a requirement of rrc with rest api.

If anybody knows it, explain how to make it.

Thanks.


One answer



permanent link
Gabriel Ruelas (1.1k13) | answered Sep 25 '12, 1:19 p.m.
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"

Your answer


Register or to post 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.