Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to use the compute extended REST api to suspend an instance

I want to suspend and resume instances using the REST apis using a python script. I cannot figure out the exact curl request required to use so as to do the required...

i see in the OpenStack documentation that the following url is to be used -


here is the cURL request i think should be used , but i might be 100% wrong

$ curl -X POST -H "X-Auth-Token: {token}" -H "Content-Type: application/json" -d '{ "suspend" : "null" }' http://XXX.XXX.XXX.XXX:8774/v2/​{tenant_id}​/servers/​{server_id}​/action

But after running this i get an XML response with 404 Resource not found error!

  <title>404 Not Found</title>
  <h1>404 Not Found</h1>
  The resource could not be found.<br /><br />


Where am i going wrong?

Sorry if i am being totally stupid! But I am new,and finding right and easy to understand info about OpenStack is a little hard!!