0

Whenever i m trying to create image from the 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 help in this,how to create a server image using curl. But all other rackspace server api's are working fine for me.

I trie same api with version 1.0, 1.1 and 2.0 but ni success.

Thanks

1 Answer 1

2

It looks as though the URL you are using needs to be modified just a bit. If you look at the below example the URL is slightly different, in that it uses action instead of createImage after the server UUID. You would also want to use v2 as well in the URL to make the call.

Example:

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

The rest of the command looks correct, and as long as the token is valid and the server UUID is correct then you should be good to go.

You can reference this URL for additional info for the command.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .