I would model this using a non-safe request on the resource which
represents the virtual machine. This is to preserve visibility in the
request. i.e. an attempt to take some action on the VM is probably
modifying its state and therefore modifying its representation - by
addressing the interaction via its URL you are making this change of
state visible on the network to any intermediaries (e.g. cache
invalidation).
in practice this could look like this:
PUT /vm/123
{ "state": "restarting" }
You could use POST but I imagine this request is idempotent so, again,
you will increase the visibility of the request by using an idempotent
method for the interaction.
Cheers,
M
--
Mike
http://twitter.com/mikekelly85
http://github.com/mikekelly
http://linkedin.com/in/mikekelly123