Transition API
Transitions
Transitions are project specific steps in your process workflow. Once your project is setup and configured with the appropriate transitions, you can use the API to execute a transition on a particular card. The transition itself can be identified by the name, and the card by its number. Certain transitions require the user to enter a comment or make it mandatory to set certain property values. You can do these as well using the API.
Before you execute transitions using the API, we recommend that familiarize yourself with some key concepts dealing with transitions.
Executing a transition
Reference
Request Method: POST
URL: /projects/project_identifier/transition_executions.xml
Parameters: NA
transition_execution[transition]: String, name of the transition to execute, required
transition_execution[card]: Integer, number of the card to execute the transition on, required
transition_execution[comment]: String, comment to be added when executing the transition, required if transition is created with "require comment" set to true
properties[][name]: String, each value for a parameter with this key is the name of a property that needs to be set while executing the transition, required if transition is created with "require user to input" for the particular property
properties[][value]: String, each value for a parameter with this key is the value for the property in the corresponding position in the the properties[][name] parameter values.
Example
POST
http://yourname:password@your.mingle.server:8080/projects/test_project/transition_executions.xml
transition_execution[transition]=close defect
transition_execution[card]=212
transition_execution[comment]=could not reproduce
properties[][name]=fixed in version
properties[][value]=release 1 branch
properties[][name]=fixed in revision
properties[][value]=1234
Explanation
The above is an example of a POST to execute a transition called "close defect" on a card with number 212; in a project with identifier "test_project". The request is made with the authorization credentials of yourname/password. When the transition is applied, a comment will be added. The properties[] parameter can be understood as follows. The first value for properties[][name] is "fixed in version" and the first value in properties[][value] is "release 1 branch". This means that upon execution of the transition, the value of "fixed in revision" will be set to "release 1 branch". The second value for properties[][name] is "fixed in revision" and the corresponding value in properties[][value] is "1234". Thus, upon execution of the transition, the value of "fixed in revision" will be set to "1234". This can be repeated for as many properties that were configured as "(require user input)" when the transition was setup.
Result
If you were authorized to perform the operation, and the operation succeeded, you will be returned a location attribute in the http header of the response, which is a url from which you can get the card resource that was updated by the transition.