It's all about the answers!

Ask a question

We are not able to update the workitem using etag. Need help to update via API in CCM?


Nandess V (111) | asked Jul 20 '18, 10:57 a.m.
edited Jul 23 '18, 3:03 a.m. by Muralidhar Rajagopal (10114)

 

Hi , 
We are able to update the defects via API without etag. Now we are trying to validate with etag but getting the below error,
Response:
{    "oslc_cm:message": "CRJAZ0007I Unable to update the item identified by <<defect ccm url>> - there is a later version of this item available.",    "oslc_cm:status": 412}

Sample code snippet:
HttpPut httpPut = new HttpPut("<<defect ccm url>>");
httpPut.setHeader("Accept", "text/json");
httpPut.setHeader("Content-Type", "application/x-oslc-cm-change-request+json");
httpPut.setHeader("If-Match", reterievedDefect(httpClient));

Example reterievedDefect(httpClient) - this will return :  "db5db62c-ca89-3dcb-b2a8-ce8c29dac064"



Comments
Ralph Schoon commented Jul 23 '18, 5:29 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Be the first one to answer this question!


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