Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

delete or update a relatedArtifact link via Rest Api

 I am trying to delete or update a work item related artifact link using rest api.
for this I use a partial representation with cmd:
$CURL -s -k  -b $COOKIES -o $file "${HOST}/oslc/workitems/$id/rtc_cm:com.ibm.team.workitem.linktype.relatedartifact.relatedArtifact.xml

I get the list of artifact related links of the work item in short xml file

Now I replace or delete the relevant line relative to link I want to update/delete

and return new updated file by

$CURL -v -S -D - -k -b $COOKIES  -H \"Content-Type: application/x-oslc-cm-change-request+xml\" -H \"Accept: application/x-oslc-cm-change-request+xml\" -X PUT --data-binary \@$outfile $URL

the return response has HTTP/1.1 200 OK message code.

but nothing happen, in the work item the link still exists.
someone has an idea what I did wrong?
Thx
Roger

0 votes



One answer

Permanent link
you cannot 'update' a link.. it is a unique object with unique endpoint objects.. you can delete one and create another.. even another with the same start and end beomes a unique object in the repository database.

I do not know how to do this with rest apis

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 11,008

Question asked: Feb 04 '15, 3:26 a.m.

Question was seen: 3,726 times

Last updated: Feb 04 '15, 7:22 a.m.

Confirmation Cancel Confirm