Home > Guides > RightScale API 1.0 > RightScale API 1.0 Examples > Deployments > Create a Deployment

Create a Deployment

Examples


The following example creates a new Deployment using a previously saved cookie for authentication.

Curl Example

# 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

Ruby Wrapper Example

params = { 'deployment[nickname]' => 'My New Deployment', 'deployment[description]' => '1st test Deployment created with the Ruby Wrapper API' }
api.send("deployments","post",params)

Sample Output

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.

You must to post a comment.
Last Modified
21:57, 16 May 2013

Tags


Announcements

None

Glossary | 用語용어 Site Map | Site Help Community Corporate Site Get Support Dashboard Login
Doc Feedback Product Feedback Resources MultiCloud Marketplace Forums

Dashboard Status


© 2006-2014 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.