It's all about the answers!

Ask a question

Unable to change defect status by REST API


zhen wang (111) | asked Jan 09 '19, 4:22 a.m.
edited Jan 14 '19, 12:43 a.m.

I saw some guys are able to update state by oslc API, but I am still not able to do that.

I get http 200, but the status of defect is not changed. I am using JAVA. Can anyone help me with this? Here is my steps:

1. HttpGet

url: https://server/ccm2/authenticated/identity

2. HttpPost

url: https://server/ccm2/authenticated/j_security_check


3.HttpGet

url:https://server/ccm2/resource/itemName/com.ibm.team.workitem.WorkItem/19917

"Accept", "application/rdf+xml"
"OSLC-Core-Version", "2.0"

then get the "ETag" in response header.


4.HttpPut

url:https://server/ccm2/resource/itemName/com.ibm.team.workitem.WorkItem/19917?_action=com.ibm.team.workitem.taskWorkflow.action.startWorking

"Content-Type", "application/rdf+xml"
"If-Match", ETag
"Accept", "application/rdf+xml"
"OSLC-Core-Version", "2.0"


with the response xml in step 3.

 I also tried "https://server/ccm2/resource/itemName/com.ibm.team.workitem.WorkItem/19917?_action=com.ibm.team.workitem.defectWorkflow.action.startWorking", "https://server/ccm2/resource/itemName/com.ibm.team.workitem.WorkItem/19880?_action=com.ibm.team.workitem.taskWorkflow.action.a1", "https://server/ccm2/resource/itemName/com.ibm.team.workitem.WorkItem/19880?_action=com.ibm.team.workitem.bugzillaWorkflow.action.startWorking" and "https://server/ccm2/resource/itemName/com.ibm.team.workitem.WorkItem/19880?_action=bugzillaWorkflow.action.close"

All return 200, but status not updated.

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.