is it possible to update a collection via OSLC REST call(s)?
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:
and I can follow that resource reference and get the list of User entries...
...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?
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
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.
note: xmlns references in the code snippet above are abbreviated to "..." but should actually be real 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>