RTC REST API - Invoke Workflow Action
Eric Lemes (1●2●3)
| asked Apr 17 '14, 11:12 a.m.
edited Dec 03 '21, 7:53 a.m. by Ralph Schoon (63.6k●3●36●46) 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
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.
|
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 |
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.