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=""/>

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="" xmlns:rtc_cm="..." xmlns:rdf="..."
<rtc_cm:stakeholder rdf:resource="" xmlns:rtc_cm="..." xmlns:rdf="..."

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.