I think there are a couple of things that the documentation are lacking:
1. The documentation should explain the path to the VM and resource a bit better... so I found that it has to be /<DATACENTER NAME/vm/<FOLDERNAME>/<machine name>
2. You have to specify a resource_type, maybe this only applies if the VM has multiple compute resources/clusters.