In RRC, how do I create an "Implemented By" link using the REST API and C#?
Hello,
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:
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:
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,
Andrew
|
Accepted answer
Hi,
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
Comments
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?
Regards,
Andrew
Gabriel Ruelas
commented Feb 10 '14, 10:57 a.m.
Andrew, you have to put back the entire XML. Looks for examples at : https://jazz.net/library/article/1197
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
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.