OSLC: How to remove parent links?
I can add/change parent links by using "PUT":
https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230
https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230
<rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent rdf:resource="https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/232"/>But I can't delete parent links using that. How can I delete parent links using OSLC?
One answer
You can use "?oslc_cm.properties" URL parameter.
(1)get the current parent links.
https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230?oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent
* OSLC-Core-Version: 2.0
* Accept: application/rdf+xml
Result of "GET" example
(3)send the modified contents using "PUT"
https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230?oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent
* OSLC-Core-Version: 2.0
* content-type: application/rdf+xml
* Reference: https://jazz.net/forum/questions/98302/oslc-how-to-remove-subscribers-with-oslc
(1)get the current parent links.
https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230?oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent
* OSLC-Core-Version: 2.0
* Accept: application/rdf+xml
Result of "GET" example
<?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"(2)modify the "GET" result removing parent links.
xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:oslc_cm="http://open-services.net/ns/cm#">
<oslc_cm:ChangeRequest rdf:about="https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230?oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent">
<rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent rdf:ID="n0" rdf:resource="https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/232"/>
</oslc_cm:ChangeRequest>
<rdf:Description rdf:about="#n0">
<dcterms:title>232: title of 232 </dcterms:title>
</rdf:Description>
</rdf:RDF>
<?xml version="1.0" encoding="UTF-8"?> <rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:oslc_cm="http://open-services.net/ns/cm#">
<oslc_cm:ChangeRequest rdf:about="https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230?oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent" />
</rdf:RDF>
(3)send the modified contents using "PUT"
https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230?oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent
* OSLC-Core-Version: 2.0
* content-type: application/rdf+xml
<?xml version="1.0" encoding="UTF-8"?> <rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rtc_cm="http://jazz.net/xmlns/prod/jazz/rtc/cm/1.0/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:oslc_cm="http://open-services.net/ns/cm#">
<oslc_cm:ChangeRequest rdf:about="https://server:9443/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/230?oslc_cm.properties=rtc_cm:com.ibm.team.workitem.linktype.parentworkitem.parent" />
</rdf:RDF>
* Reference: https://jazz.net/forum/questions/98302/oslc-how-to-remove-subscribers-with-oslc