The following example creates a new Deployment using a previously saved cookie for authentication.
# Set variables nickname="test_deployment" # Set the Deployment's nickname description="test_description" # Set the Deployment's description account=MyAccountNumber # Set your account number. Obtain via your browser in the Dashboard. Tail end of the URL: Settings > Account. # Create the new Deployment via a curl command sent to the RightScale API curl -H 'X-API-VERSION:1.0' -b <./mySavedCookies> -d "deployment[description]=$description" -d "deployment[nickname]=$nickname" https://my.rightscale.com/api/acct/$account/deployments
params = { 'deployment[nickname]' => 'My New Deployment', 'deployment[description]' => '1st test Deployment created with the Ruby Wrapper API' }
api.send("deployments","post",params)
HTTP/1.1 201 Created
Date: Tue, 02 Jun 2009 17:45:19 GMT
Server: Mongrel 1.1.4
Status: 201 Created
Location: https://my.rightscale.com/api/acct/1234/deployments/21520 X-Runtime: 0.06091
Cache-Control: no-cache
Content-Type: application/xml; charset=utf-8
Content-Length: 1
Cache-control: private
.
.
.
The Deployment ID (21520) is returned in the location field of the response. You may need to use the Deployment ID in additional API commands, such as Updating a Deployment.
| Site Map | Community | Training | Corporate Site | Get Support | Dashboard Login | |
| Product Feedback | Resources | Forums | MultiCloud Marketplace | Support Tickets |
© 2006-2013 RightScale, Inc. All rights reserved.
RightScale is a registered trademark of RightScale, Inc. All other products and services may be trademarks or servicemarks of their respective owners.