Ask Your Question

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

asked 2014-06-18 01:00:57 -0500

Nirmik Kale gravatar image

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!!

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2014-06-18 06:24:00 -0500

frz59 gravatar image

Check if your server_id is correct

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-06-18 01:00:57 -0500

Seen: 278 times

Last updated: Jun 18 '14