It's all about the answers!

Ask a question

In RRC, how do I create an "Implemented By" link using the REST API and C#?

Andrew Trobec (49712144139) | asked Feb 10 '14, 10:07 a.m.

I am trying to create an "Implemented By" link using the REST API in C# for an artifact in RRC to a work item in RTC.  I have referred to this post for a little guidance, but it is not very clear.

Basically what I did first was make a GET post to an artifact using the it's URL and by specifying the link type that I want:


This call provided me with an XML format that I copied as the body of my PUT post.  Also, thanks to the post mentioned above, this allowed me to capture the ETAG header which I then added as an "If-Match" header for for my PUT.

When trying to PUT the modified XML along with the header, I keep getting a Forbidden error with the message:

<err:detailedMessage rdf:datatype="">CRRRS6402E Content is not allowed. Content type must be application/rdf+xml (More info found at entry [3669ba3c2e64a332] in RRS server log)</err:detailedMessage>

All my headers have "Content-Type" set to "application/rdf+xml" but it makes no difference.  Along with this header I have "OSLC-Core-Version" set to "2.0", "Accept" ser to "application/rdf+xml", and the "If-Match" header mentioned above.

Am I missing something?  Is there another way to get the XML format?  The String that I am using as my request body looks as follows:

"<rdf:RDF " +
"xmlns:rdf=\"\" " +
"xmlns:dcterms=\"\" " +
"xmlns:oslc_cm=\"\" " +
"xmlns:rtc_cm=\"\" > " +
"<rdf:Description rdf:nodeID=\"A0\">" +
"<rdf:subject rdf:resource=\"" + _requirement.about + "\"/>" +
"<rdf:predicate rdf:resource=\"\"/>" +
"<rdf:object rdf:resource=\"" + _changeRequest.about + "\"/>" +
"<rdf:type rdf:resource=\"\"/>" +
"<dc:title>" + _changeRequest.identifier + ": " + _changeRequest.title + "</dc:title>" +
"</rdf:Description>" +

where _requirement is the artifact and _changeRequest is the work item that I am linking the artifact to.

Any help would be greatly appreciated!

Best regards,


Accepted answer

permanent link
Gabriel Ruelas (1.1k13) | answered Feb 10 '14, 10:19 a.m.
RM does not support oslc_properties for update. You should do an OSLC get to the complete RM artifact, modify the link information and do the PUT .
Andrew Trobec selected this answer as the correct answer

Andrew Trobec commented Feb 10 '14, 10:55 a.m.


Thanks for the information.  When I do the PUT, do I have to put the entire XML back again that contains the attributes and values that don't concern the link, or can I slim down the XML content and only put the link?
Do you have an example by any chance?

Gabriel Ruelas commented Feb 10 '14, 10:57 a.m.

Andrew, you have to put back the entire XML. Looks for examples at :

Andrew Trobec commented Feb 10 '14, 1:08 p.m.

Hello Gabriel, not the answer i was hoping for! Thanks for feedback, I will explore!

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.