cloud - RackSpace CreateImage API using curl is not working -
whenever m trying create image given api using curl -:
curl -i -x post https://lon.servers.api.rackspacecloud.com/v1.1/xxxxxxxxx/servers/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx/createimage -h "x-auth-token: xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-xxxxxxxxx" -d '{"createimage" : {"name" : "test_image"}}' -h "content-type: application/json"
it throws me error -:
{"itemnotfound":{"message":"an unexpected fault occurred.","details":"javax.ws.rs.webapplicationexception","code":404}}* closing connection #0
i need in this,how create server image using curl. other rackspace server api's working fine me.
i trie same api version 1.0, 1.1 , 2.0 ni success.
thanks
this question answered on @ serverfault (https://serverfault.com/questions/495087/rackspace-createimage-api-using-curl-is-not-working).
in summary, need change url posting to have /action after uuid, opposed /createimage. example curl command can structured follows:
curl -x post -h "x-auth-token: auth-token" -h "content-type: application/json" -d '{"createimage" : {"name" : "test"}}' https://lon.servers.api.rackspacecloud.com/v2/account-id/servers/server-uuid/action
Comments
Post a Comment