title: REST - model state transitions
body: <p>In <a href="https://stackoverflow.com/questions/6762567/rest-revertable-delete/6764344#6764344">REST - revertable DELETE</a> a nice introduction on howto model state changes in REST was given. Basically, if you have a resource with a field <em>status</em>, you just put a new version of that resource with an update <em>status</em> field.</p>
  
  <p>In this topic, I would like to extend this model. Say you have a resource which can be in two states: 1 and 2. In contrast with the simple model as described in the cited post, there are three transitions to traverse from state 1 to state 2, instead of just one.</p>
  
  <p>My question is: <strong>how would you model state transitions in REST?</strong></p>
  
  <p>I myself cannot come up with an RPC-like POST, which isn't very RESTian probably:</p>
  
  <pre><code>POST http://server/api/x
       target_state=2&amp;transition=3
  </code></pre>
  
  <p>This changes resource <em>x</em> from state 1 to state 2 by using transition 3.</p>