RTC REST API - Invoke Workflow Action
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:
{
"rtc_cm:action":
{
}
}
I receive a HTTP 200 as answer but the Work Item don't change the state.
Any guesses?
2 answers
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
Krzysztof
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.