It's all about the answers!

Ask a question

How do I add subscribers to a work item via the REST API?

Andrew Trobec (49712144139) | asked Jan 21 '14, 10:31 a.m.
edited Jan 21 '14, 11:08 a.m. by Krzysztof Kaźmierczyk (7.4k375103)

I am developing a C# REST client for RTC and I am trying to find out how to add subscribers to a work item.  I have already read this thread and this enhancement request but I cannot seem to get my head around the process.

When creating a work item I have the following subscriber property:
<rtc_cm:subscribers oslc_cm:collref="https://<server>/ccm/oslc/workitems/__CupL39eEeOeYOj8IKVRng/rtc_cm:subscribers"/>

What I am trying to do is perform a POST/PUT directly to that address.  Is this the right approach?  All of my attempts result in a 405: Method Not Allowed response, so maybe my XML file is being formatted with the wrong headers?  Which ones should I be using?

Thank you and best regards,


Accepted answer

permanent link
Krzysztof Kaźmierczyk (7.4k375103) | answered Jan 24 '14, 9:35 a.m.
Hi Andrew,
You can check this post: Despite it is about opposite action, it can work for you as well.
Andrew Trobec selected this answer as the correct answer

Andrew Trobec commented Jan 28 '14, 3:24 a.m.


This is the perfect example to put me on the right track, thanks!

One other answer

permanent link
Krzysztof Kaźmierczyk (7.4k375103) | answered Jan 21 '14, 11:07 a.m.
Hi Andrew,
Just look at my nice answer I have provided some time ago:

Let us know if it helps.

Andrew Trobec commented Jan 22 '14, 2:17 a.m.


Thank you for the reply.
I have tried to follow your instructions, but the POST command is using JSON and it seems that the calls are made to the JAVA API.
Have you managed to either add subscribers or add links using the REST API?
Best regards,

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.