It's all about the answers!

Ask a question

RTC REST API - Invoke Workflow Action


Eric Lemes (123) | asked Apr 17 '14, 11:12 a.m.
edited Dec 03 '21, 7:53 a.m. by Ralph Schoon (63.1k33646)

 I'm trying to invoke an action in a specified work item using the REST API, without success. The request detais:


Method: PUT
Headers:
Accept: application/json
X-Jazz-CSRF-Prevent: 00002jbPIhA0xUThm4NlmkL0EOH:18hu78q1a
Content-Type: application/json

Data:

I receive a HTTP 200 as answer but the Work Item don't change the state.

Any guesses?

2 answers



permanent link
Krzysztof Płazio (132) | answered Dec 03 '21, 3:00 a.m.
edited Dec 03 '21, 3:00 a.m.

 Hi Eric Lemes

In my case POST didn't work, so i recommend using PUT.

For other people, whose finding answer, your 'action' path is:
http://server/ccm/oslc/workflows/PROJECT_ID/actions/com.server.team.workflow.defect/

You'll find PROJECT_ID in http://server/ccm/process/project-areas/
You have to just find your project area and take your project id.

If you know jazz API, you can replace "com.server.team" to your jazz options.

Best regards
Krzysztof


permanent link
Eric Lemes (123) | answered Apr 17 '14, 2:58 p.m.
 The solution:

Post in the format:
Url: https://server/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/53674?_action=com.itau.team.workflow.buildCentralizado.action.a4
Headers: 
Accept: application/json
X-Jazz-CSRF-Prevent: 00002jbPIhA0xUThm4NlmkL0EOH:18hu78q1a
Content-Type: application/json

Data:
can be an empty json object: {}


Works fine.

Your answer


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.