Deleting Servers

When a server is no longer necessary you can simply delete it. One REST call and the server is gone. You will need to add the server id number after /servers and you must use the DELETE method, as in:

$ curl -s -X DELETE -H "X-Auth-Token:999888777666" http://localhost:8774/v1.1/openstack/servers/3

The OpenStack Compute API server will not return a JSON object when the operation is successful, but it will return an error message when the server you are trying to delete does not exist:

{
  "itemNotFound": {
    "message": "The resource could not be found.", 
    "code": 404
  }
}


loading table of contents...