Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

Hello,

I am developing a C# REST client for RTC 4.0.0.1 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,

Andrew

1

0 votes


Accepted answer

Permanent link
Hi Andrew,
You can check this post: https://jazz.net/forum/questions/98302/oslc-how-to-remove-subscribers-with-oslc. Despite it is about opposite action, it can work for you as well.
Andrew Trobec selected this answer as the correct answer

2 votes

Comments

@krzysztofkazmierczyk

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


One other answer

Permanent link
Hi Andrew,
Just look at my nice answer I have provided some time ago: https://jazz.net/forum/questions/135858/how-to-perform-particular-action-using-rest-api-in-clm-applications

Let us know if it helps.

0 votes

Comments

@krzysztofkazmierczyk

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,
Andrew

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,934
× 515
× 478
× 137
× 62

Question asked: Jan 21 '14, 10:31 a.m.

Question was seen: 7,314 times

Last updated: Jan 28 '14, 3:24 a.m.

Confirmation Cancel Confirm