Power actions on ec2 hosts

Hello foreman users!

I have not been able to get power actions to work through the v2 API on
foreman 1.7.1. I am following the API spec here:
http://theforeman.org/api/apidoc/v2/hosts/power.html

curl -X PUT --user user:pass -H "Content-Type: application/json" -d '{"power_action":"status","host":{}}'
https://foreman/api/v2/hosts/testhost.example.com/power

{

"error": {"message":"undefined method `search_for' for
#<Class:0x000000045395e0>"}

}

Full stack trace: http://pastebin.com/dtwx6x2e

The same operation works OK in the UI. I did not find any other threads on
this.

Any help would be appreciated.