Delete related links with REST API
I use method PUT for add related link, it's work fine on cUrl.
@echo { "rdf:resource":"%HOST%/itemName/com.ibm.team.workitem.WorkItem/%ID_UPDATED_WI%" } > somelink.json curl.exe -# -k -b %COOKIES% -H "Content-Type: application/x-oslc-cm-change-request+json" -H "Accept: application/X-Jazz-CSRF-Prevent" -X PUT --data-binary @somelink.json "%HOST%/oslc/workitems/%ID_ADDED_WI%/rtc_cm:com.ibm.team.workitem.linktype.copiedworkitem.copiedFrom" but when I try delete that link by method DELETE - it doesn't work. What I can delete it? |
Accepted answer
If you mean the HTTP DELETE operation, then no, you cannot use it. Even if you can use it, you delete the WI instead, which is not what you want.
To delete a link, do a PUT with all the existing links except the one that you don't want any more. Pavel Cikota selected this answer as the correct answer
Comments Thank you to answer!
Pavel Cikota
commented Sep 08 '16, 10:48 a.m.
"To delete a link, do a PUT with all the existing links except the one that you don't want any more."
Donald Nong
commented Sep 08 '16, 11:34 p.m.
|
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.