It's all about the answers!

Ask a question

is it possible to update a collection via OSLC REST call(s)?


Scott Russell (4688) | asked Sep 07 '11, 5:02 p.m.
wondering if it's possible to update a custom field (test owners) of users via any OSLC REST api call(s)?

From the work item it is surfaced as:
<rtc_cm:testowner oslc_cm:collref="https://csnext-test.ibm.com/jazz1/oslc/workitems/_CPercMLQEeCTNbydi54xcw/rtc_cm:testowner"/>

and I can follow that resource reference and get the list of User entries...
<oslc_cm:Collection ...

<rtc_cm:User ...

...but don't know how to update the collection. Either adding users to that collection or specifying all users and having the system create a new collection reference.

Anyone successfully done something similar?

One answer



permanent link
Scott Russell (4688) | answered Sep 09 '11, 2:08 p.m.
In case someone else needs something similar I found something that works for my instance. The custom field "stakeholder" is a collection of users. The update replaces the existing collection with the one given in the partial put. The stakeholder rdf:resource= references are user references.

<oslc_cm:ChangeRequest xmlns:rdf="...." xmlns:oslc_cm="...">

<rtc_cm:stakeholder rdf:resource="https://csnext-test.ibm.com/jazz1/oslc/users/_Q5FdQJK5EeCcIJZPDZHNsQ" xmlns:rtc_cm="..." xmlns:rdf="..."
<rtc_cm:stakeholder rdf:resource="https://csnext-test.ibm.com/jazz1/oslc/users/_Xxi-oM5pEeCMlfWEtoQ94g" xmlns:rtc_cm="..." xmlns:rdf="..."
</oslc_cm:ChangeRequest>


note: xmlns references in the code snippet above are abbreviated to "..." but should actually be real references.

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.