cURL / Mailing Lists / curl-users / Single Mail

curl-users

Using Curl with rackspacecloud.com

From: Stuart Halliday <stuart_at_mytriops.com>
Date: Wed, 31 Mar 2010 11:45:37 +0100

I've just started to use cURL with this companys virtual servers and I need
a little help with a cURL user also using this.

I wish to write a REBOOT batch script.

I've got cURL fetching the Token key and management URL. I've got it
returning useful data via GET. So that all works.

But how to use the REBOOT ability escapes my grasp.

I'm doing on Windows :
C:\curl -X POST -H "X-Auth-Token: xxxxxxxx-XXXXX--xxxxxxxxx" \
https://servers.api.rackspacecloud.com/v1.0/12345/servers/444/action

where 444 is my id.

I understand it is a POST operation.
But the document 'cloud servers developer guide' page 34 doesn't explain
well what to put into the POST data in order to do a soft or hard reboot.

It says :

Sample XML Request
<reboot xmlns="http://docs.rackspacecloud.com/servers/api/v1.0"
type="HARD"/>

Which I assume is the data I've to send in POST format.

But how do I POST this?

I'd appreciate any help. :-)

-- 
Stuart Halliday
http://mytriops.com/
200 Million years in the making...
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2010-03-31