API Calls with options and parameters

>> Query parameter (GET, DELETE) => add into the URL like ...?param=value

e.g.
curl -sH "X-Auth-Token: $TOKEN" -H "Content-type: application/json" -X DELETE https://lon.autoscale.api.rackspacecloud.com/v1.0/$ID/groups/$GROUPID/servers/$SERVER_UID?replace=false


>> Payload/Options (PUT, POST) => use -d 

e.g. 
curl -sH "X-Auth-Token: $TOKEN" -H "Content-type: application/json" -X PUT https://lon.backup.api.rackspacecloud.com/v1.0/$DDI/agent/migratevault -d '{"DestinationMachineAgentId": "$DEST_AGENT_ID", "SourceMachineAgentId": "$SOURCE_AGENT_ID"}' 


>> To print output:

| python -m json.tool


=========================================================
CREATE IMAGE

TOKEN=""
IMAGENAME=""
curl -sH "X-Auth-Token: $TOKEN" -H "Content-Type: application/json" -X POST https://{region}.servers.api.rackspacecloud.com/v2/{ddi}/servers/{server_id}/action -d "{\"createImage\": {\"name\": \"$IMAGENAME\"}}" -v; echo