NAV Navbar <<<<<<< Updated upstream
Logo
=======
>>>>>>> Stashed changes

Introduction

Cloud 66 is a full stack container management as a service. It allows you to build, provision, configure and manage Docker containers on your own server on any cloud. You can find more information on Cloud 66 on our help site.

Resource model

The Cloud 66 API is organised around REST. It is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors.

We use built-in HTTP features, like HTTP authentication and HTTP verbs, which can be understood by off-the-shelf HTTP clients.

JSON will be returned in all responses from the API, including errors (though if you're using API bindings, we will convert the response to the appropriate language-specific object).

Authentication

Cloud 66 uses OAuth2 to authenticate users and grant access to stacks and redeployments. To use it, you need an OAuth 2.0 compatible client. To submit API requests, you must pass an OAuth token. An OAuth token functions as a complete authentication request, acting as a substitute for a username and password pair. Because of this, it is absolutely essential that you keep your OAuth tokens secure.

To authenticate your requests with OAuth you need to send a bearer authorization header with your request. This is the preferred method of authenticating because it completes the authorization request in the header portion, away from the actual request.

Usually, you use a language binding (like a Ruby gem or Go package) to deal with the OAuth authentication. Alternatively, you can include the OAuth authentication token in the header of each request:

Authorization: bearer 5262d64b892e8d4341000001

You can generate an OAuth token by visiting the Apps , under your Account.

How to authenticate with OAuth2

You can generate an OAuth token using the Your Account > Apps area of the Cloud 66 user interface or using the API.

Step 1 - Redirect users to request Cloud 66 access

GET https://app.cloud66.com/oauth/authorize

Parameter Description Presence
client_id The client ID you received from Cloud 66 when you registered. required
redirect_url URL in your app where users will be sent after authorization. required
scope Comma separated list of scopes. optional

Step 2 - Cloud 66 redirects back to your site

If the user accepts your request, Cloud 66 redirects back to your site with a temporary code in a code parameter as well as the state you provided in the previous step in a state parameter. If the states don’t match, the request has been created by a third party and the process should be aborted.

Exchange this for an access token:

POST https://app.cloud66.com/oauth/token

Parameter Description Presence
client_id The client ID you received from Cloud 66 when you registered. required
redirect_url URL in your app where users will be sent after authorization. optional
client_secret The client secret you received from Cloud 66 when you registered. required

Response By default, the response will take the following form:

access_token=e72e16c7e42f292c6912e7710c838347ae178b4a&amp;token_type=bearer
Accept: application/json {"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a","token_type":"bearer"}

Step 3 - Use the access token to access the API

The access token allows you to make requests to the API on behalf of a user.

GET "https://app.cloud66.com/api/3/stacks.json" -H "Authorization: Bearer e72e...b4a"

Scoped access

A user’s scope defines the limits of the actions the user can perform with the Cloud 66 API. The user’s scope is encrypted as part of the OAuth access token. Users cannot submit requests not allowed by their defined scopes.

For the web flow, requested scopes be displayed to the user on the authorize form.

Scope Description
(no scope) Users with this scope have public read-only access and can view limited stack information.
public Users with this scope have public read-only access and can view limited stack information.
redeploy Users with this scope can redeploy any stacks they can access.
jobs Users with this scope can view the scheduled jobs for the stacks they can access.
users Users with this scope can manage other users’ mobile devices.
admin Users with this scope can set and manage settings for the servers they can access.

https://app.cloud66.com/oauth/authorize?client_id=...&scope=public+redeploy

Example

require 'rubygems'
require 'oauth2'
require 'json'

base = 'https://app.cloud66.com'
api_url = 'https://app.cloud66.com/api/3'

if File.exists? '/tmp/cloud66_oauth_test.json'
    config = JSON.parse(File.read('/tmp/cloud66_oauth_test.json'))
    client = OAuth2::Client.new(config['app_id'], config['app_secret'], :site => base)
    token = OAuth2::AccessToken.new(client, config['token'])
else
    client = OAuth2::Client.new(ENV['APP_ID'], ENV['APP_SECRET'], :site => base)
    puts client.auth_code.authorize_url(:redirect_uri => 'urn:ietf:wg:oauth:2.0:oob', :scope => 'public admin redeploy')

    puts "Enter the code:"
    code = gets.strip

    token = client.auth_code.get_token(code, :redirect_uri => "urn:ietf:wg:oauth:2.0:oob")

    # save it
    File.write('/tmp/cloud66_oauth_test.json', { :app_id => ENV['APP_ID'], :app_secret => ENV['APP_SECRET'], :token => token.token }.to_json)
end

# Now you can use the token to call API methods, like:

# List all the stacks
response = token.get("#{api_url}/stacks.json")

# list all the servers in the stack
stack_uid = 'ENTER_STACK_UID'
response = token.get("#{api_url}/stacks/#{stack_uid}/servers.json")

# show the response (no error handling)
puts JSON.parse(response.body)['response']
# Simple GET
# Get list of stacks:
curl -X GET "https://app.cloud66.com/api/3/stacks.json" -H "Authorization: Bearer 4c9c9b1111"

# GET with some params
# Get list of all `mysql` backups in `1345` backup group:
curl -X GET "https://app.cloud66.com/api/3/stacks/f196c5b41758cb7977620d49eb1492ef/backups.json" -H "Authorization: Bearer 4c9c9b1111" -d group=1345 -d db_type=mysql

# POST
# Add a new iPhone application to user ID 18 with 'wertqy' as a token:
curl -X POST "https://app.cloud66.com/api/3/users/18/devices.json" -H "Authorization: Bearer 4c9c9b1111" -d token=wertqy -d device_type=1 -d sub_type=1

# PUT
# Update the type of device with token 'wertqy' to iPad:
curl -X PUT "https://app.cloud66.com/api/3/users/18/devices/wertqy.json" -H "Authorization: Bearer 4c9c9b1111" -d device_type=1 -d sub_type=2

# DELETE
# Delete device with token 'wertqy':
curl -X DELETE "https://app.cloud66.com/api/3/users/18/devices/wertqy.json" -H "Authorization: Bearer 4c9c9b1111"

Ruby

This example shows how to get the first token using the Application (Client) ID and Secret. This is using urn:ietf:wg:oauth:2.0:oob for command line tools.

Once you have the code, you can apply for a token. Tokens issued by the API server do not expire and are valid until the user revokes their access. You can see how to store and retrieve the token for future use in this example.

cURL

For example, you can get lists of stacks with this command:

curl -X GET "https://app.cloud66.com/api/3/stacks.json" -H "Authorization: Bearer PERSONAL_ACCESS_TOKEN"`

You can use your personal access token to call the API with cURL - it just needs to be passed in as a header.

Assuming that your personal access token is 4c9c9b1111, you can find some examples for using cURL.

Go Example

You can use the Cloud 66 Go library repository if you want to use Go.

Synchronous vs. asynchronous requests

#Asynchronous example
stack_id = 'a6b583684833a2cf4845079c9d9350a8'
response = token.post("#{api_url}/stacks/#{stack_id}/actions.json", {body: {:command => 'clear_caches'}})

#Get the action ID
id = JSON.parse(response.body)['response']['id']
puts "Started action with ID: #{id}"

...

#After some time check status
response = token.get("#{api_url}/stacks/#{stack_id}/actions/#{id}.json")

result = JSON.parse(response.body)['response']

#Check if the request finished successfully
if result['finished_success']=='true'
  puts 'Success!'
else
  puts "Failed. Error: #{result['finished_message']}"
end

The Cloud 66 API uses both synchronous and asynchronous methods. Asynchronous methods are specified in the documentation for the associated calls; all others are generally considered synchronous.

Synchronous methods will wait for the server to return a response for the request before it will continue processing. Your application will not perform any additional actions until it receives a response from the server.

Asynchronous methods will submit the request to the server, but the application will not wait for a response from the server to continue processing. When the server returns a response, the application can execute a callback function to retrieve the response object, but will continue processing until the response is received.

Date formats

Cloud 66 accepts and returns date values according to the ISO 8601 standard. Combined date and time values appear in UTC including local time zone offsets. For example: 2014-06-15T14:13:18+00:00

Rate limiting

The Cloud 66 API can receive a maximum of 3,000 requests per user per hour. When the request level reaches the maximum rate, subsequent requests will return a 503: throttled HTTP status message and the user must retry the request in the next hourly interval.

Standard HTTP response statuses

Requests made using the Cloud 66 API can return any of the following response status codes.

Code Message Description
200 ok The request completed successfully.
400 bad_request The system cannot parse the request syntax. It might be missing required parameters or include an invalid value.
401 unauthenticated No authentication token was passed in the request.
402 trial_expired The user’s Cloud 66 trial period has expired.
403 forbidden The user does not have the scope required to submit this request.
404 not_found The system cannot find a response for this request URI.
408 time_out The system did not return a response before the server timed out.
409 conflict The system did not return a response because there is a current conflict with the resource.
503 not_implemented This resource is not actively implemented in this version of the Cloud 66 API.
503 throttled The user has reached or exceeded the maximum rate limit and must wait until the next hourly interval to retry the request.

Stack UID retrieval

Many requests in the Cloud 66 API rely on the Stack UID value, an alphanumeric string that uniquely identifies your stack. You can retrieve this value by accessing the Stack information page from the right sidebar of your stack page or by submitting an API request to list all stacks. The Stack UID appears in the response body for each stack you maintain.

Cloud vendor instance names

Amazon Web Services

Key Description
a1.2xlarge General purpose (a1.2xlarge)
a1.4xlarge General purpose (a1.4xlarge)
a1.large General purpose (a1.large)
a1.medium General purpose (a1.medium)
a1.xlarge General purpose (a1.xlarge)
c1.medium Compute optimized (c1.medium)
c1.xlarge Compute optimized (c1.xlarge)
c3.2xlarge Compute optimized (c3.2xlarge)
c3.4xlarge Compute optimized (c3.4xlarge)
c3.8xlarge Compute optimized (c3.8xlarge)
c3.large Compute optimized (c3.large)
c3.xlarge Compute optimized (c3.xlarge)
c4.2xlarge Compute optimized (c4.2xlarge)
c4.4xlarge Compute optimized (c4.4xlarge)
c4.8xlarge Compute optimized (c4.8xlarge)
c4.large Compute optimized (c4.large)
c4.xlarge Compute optimized (c4.xlarge)
c5.18xlarge Compute optimized (c5.18xlarge)
c5.2xlarge Compute optimized (c5.2xlarge)
c5.4xlarge Compute optimized (c5.4xlarge)
c5.9xlarge Compute optimized (c5.9xlarge)
c5.large Compute optimized (c5.large)
c5.xlarge Compute optimized (c5.xlarge)
c5d.18xlarge Compute optimized (c5d.18xlarge)
c5d.2xlarge Compute optimized (c5d.2xlarge)
c5d.4xlarge Compute optimized (c5d.4xlarge)
c5d.9xlarge Compute optimized (c5d.9xlarge)
c5d.large Compute optimized (c5d.large)
c5d.xlarge Compute optimized (c5d.xlarge)
c5n.18xlarge Compute optimized (c5n.18xlarge)
c5n.2xlarge Compute optimized (c5n.2xlarge)
c5n.4xlarge Compute optimized (c5n.4xlarge)
c5n.9xlarge Compute optimized (c5n.9xlarge)
c5n.large Compute optimized (c5n.large)
c5n.xlarge Compute optimized (c5n.xlarge)
cc2.8xlarge Compute optimized (cc2.8xlarge)
cr1.8xlarge Memory optimized (cr1.8xlarge)
d2.2xlarge Storage optimized (d2.2xlarge)
d2.4xlarge Storage optimized (d2.4xlarge)
d2.8xlarge Storage optimized (d2.8xlarge)
d2.xlarge Storage optimized (d2.xlarge)
h1.16xlarge Storage optimized (h1.16xlarge)
h1.2xlarge Storage optimized (h1.2xlarge)
h1.4xlarge Storage optimized (h1.4xlarge)
h1.8xlarge Storage optimized (h1.8xlarge)
hs1.8xlarge Storage optimized (hs1.8xlarge)
i2.2xlarge Storage optimized (i2.2xlarge)
i2.4xlarge Storage optimized (i2.4xlarge)
i2.8xlarge Storage optimized (i2.8xlarge)
i2.xlarge Storage optimized (i2.xlarge)
i3.16xlarge Storage optimized (i3.16xlarge)
i3.2xlarge Storage optimized (i3.2xlarge)
i3.4xlarge Storage optimized (i3.4xlarge)
i3.8xlarge Storage optimized (i3.8xlarge)
i3.large Storage optimized (i3.large)
i3.metal Storage optimized (i3.metal)
i3.xlarge Storage optimized (i3.xlarge)
m1.large General purpose (m1.large)
m1.medium General purpose (m1.medium)
m1.small General purpose (m1.small)
m1.xlarge General purpose (m1.xlarge)
m2.2xlarge Memory optimized (m2.2xlarge)
m2.4xlarge Memory optimized (m2.4xlarge)
m2.xlarge Memory optimized (m2.xlarge)
m3.2xlarge General purpose (m3.2xlarge)
m3.large General purpose (m3.large)
m3.medium General purpose (m3.medium)
m3.xlarge General purpose (m3.xlarge)
m4.10xlarge General purpose (m4.10xlarge)
m4.16xlarge General purpose (m4.16xlarge)
m4.2xlarge General purpose (m4.2xlarge)
m4.4xlarge General purpose (m4.4xlarge)
m4.large General purpose (m4.large)
m4.xlarge General purpose (m4.xlarge)
m5.12xlarge General purpose (m5.12xlarge)
m5.24xlarge General purpose (m5.24xlarge)
m5.2xlarge General purpose (m5.2xlarge)
m5.4xlarge General purpose (m5.4xlarge)
m5.large General purpose (m5.large)
m5.metal General purpose (m5.metal)
m5.xlarge General purpose (m5.xlarge)
m5a.12xlarge General purpose (m5a.12xlarge)
m5a.24xlarge General purpose (m5a.24xlarge)
m5a.2xlarge General purpose (m5a.2xlarge)
m5a.4xlarge General purpose (m5a.4xlarge)
m5a.large General purpose (m5a.large)
m5a.xlarge General purpose (m5a.xlarge)
m5ad.12xlarge General purpose (m5ad.12xlarge)
m5ad.24xlarge General purpose (m5ad.24xlarge)
m5ad.2xlarge General purpose (m5ad.2xlarge)
m5ad.4xlarge General purpose (m5ad.4xlarge)
m5ad.large General purpose (m5ad.large)
m5ad.xlarge General purpose (m5ad.xlarge)
m5d.12xlarge General purpose (m5d.12xlarge)
m5d.24xlarge General purpose (m5d.24xlarge)
m5d.2xlarge General purpose (m5d.2xlarge)
m5d.4xlarge General purpose (m5d.4xlarge)
m5d.large General purpose (m5d.large)
m5d.metal General purpose (m5d.metal)
m5d.xlarge General purpose (m5d.xlarge)
r3.2xlarge Memory optimized (r3.2xlarge)
r3.4xlarge Memory optimized (r3.4xlarge)
r3.8xlarge Memory optimized (r3.8xlarge)
r3.large Memory optimized (r3.large)
r3.xlarge Memory optimized (r3.xlarge)
r4.16xlarge Memory optimized (r4.16xlarge)
r4.2xlarge Memory optimized (r4.2xlarge)
r4.4xlarge Memory optimized (r4.4xlarge)
r4.8xlarge Memory optimized (r4.8xlarge)
r4.large Memory optimized (r4.large)
r4.xlarge Memory optimized (r4.xlarge)
r5.12xlarge Memory optimized (r5.12xlarge)
r5.24xlarge Memory optimized (r5.24xlarge)
r5.2xlarge Memory optimized (r5.2xlarge)
r5.4xlarge Memory optimized (r5.4xlarge)
r5.large Memory optimized (r5.large)
r5.metal Memory optimized (r5.metal)
r5.xlarge Memory optimized (r5.xlarge)
r5a.12xlarge Memory optimized (r5a.12xlarge)
r5a.24xlarge Memory optimized (r5a.24xlarge)
r5a.2xlarge Memory optimized (r5a.2xlarge)
r5a.4xlarge Memory optimized (r5a.4xlarge)
r5a.large Memory optimized (r5a.large)
r5a.xlarge Memory optimized (r5a.xlarge)
r5ad.12xlarge Memory optimized (r5ad.12xlarge)
r5ad.24xlarge Memory optimized (r5ad.24xlarge)
r5ad.2xlarge Memory optimized (r5ad.2xlarge)
r5ad.4xlarge Memory optimized (r5ad.4xlarge)
r5ad.large Memory optimized (r5ad.large)
r5ad.xlarge Memory optimized (r5ad.xlarge)
r5d.12xlarge Memory optimized (r5d.12xlarge)
r5d.24xlarge Memory optimized (r5d.24xlarge)
r5d.2xlarge Memory optimized (r5d.2xlarge)
r5d.4xlarge Memory optimized (r5d.4xlarge)
r5d.large Memory optimized (r5d.large)
r5d.metal Memory optimized (r5d.metal)
r5d.xlarge Memory optimized (r5d.xlarge)
t1.micro Micro instances (t1.micro)
t2.2xlarge General purpose (t2.2xlarge)
t2.large General purpose (t2.large)
t2.medium General purpose (t2.medium)
t2.micro General purpose (t2.micro)
t2.nano General purpose (t2.nano)
t2.small General purpose (t2.small)
t2.xlarge General purpose (t2.xlarge)
t3.2xlarge General purpose (t3.2xlarge)
t3.large General purpose (t3.large)
t3.medium General purpose (t3.medium)
t3.micro General purpose (t3.micro)
t3.nano General purpose (t3.nano)
t3.small General purpose (t3.small)
t3.xlarge General purpose (t3.xlarge)
t3a.2xlarge General purpose (t3a.2xlarge)
t3a.large General purpose (t3a.large)
t3a.medium General purpose (t3a.medium)
t3a.micro General purpose (t3a.micro)
t3a.nano General purpose (t3a.nano)
t3a.small General purpose (t3a.small)
t3a.xlarge General purpose (t3a.xlarge)
u-12tb1.metal Memory optimized (u-12tb1.metal)
u-6tb1.metal Memory optimized (u-6tb1.metal)
u-9tb1.metal Memory optimized (u-9tb1.metal)
x1.16xlarge Memory optimized (x1.16xlarge)
x1.32xlarge Memory optimized (x1.32xlarge)
x1e.16xlarge Memory optimized (x1e.16xlarge)
x1e.2xlarge Memory optimized (x1e.2xlarge)
x1e.32xlarge Memory optimized (x1e.32xlarge)
x1e.4xlarge Memory optimized (x1e.4xlarge)
x1e.8xlarge Memory optimized (x1e.8xlarge)
x1e.xlarge Memory optimized (x1e.xlarge)
z1d.12xlarge Memory optimized (z1d.12xlarge)
z1d.2xlarge Memory optimized (z1d.2xlarge)
z1d.3xlarge Memory optimized (z1d.3xlarge)
z1d.6xlarge Memory optimized (z1d.6xlarge)
z1d.large Memory optimized (z1d.large)
z1d.metal Memory optimized (z1d.metal)
z1d.xlarge Memory optimized (z1d.xlarge)

Azure

Key Description
Basic_A0 Basic - A0 - 1 vCPUs - 0.75GB RAM
Basic_A1 Basic - A1 - 1 vCPUs - 1.75GB RAM
Basic_A2 Basic - A2 - 2 vCPUs - 3.5GB RAM
Basic_A3 Basic - A3 - 4 vCPUs - 7GB RAM
Basic_A4 Basic - A4 - 8 vCPUs - 14GB RAM
Standard_A0 A0 - 1 vCPUs - 0.75GB RAM
Standard_A1 A1 - 1 vCPUs - 1.75GB RAM
Standard_A1_v2 A1 (v2) - 1 vCPUs - 2GB RAM
Standard_A2 A2 - 2 vCPUs - 3.5GB RAM
Standard_A2_v2 A2 (v2) - 2 vCPUs - 4GB RAM
Standard_A2m_v2 A2m (v2) - 2 vCPUs - 16GB RAM
Standard_A3 A3 - 4 vCPUs - 7GB RAM
Standard_A4 A4 - 8 vCPUs - 14GB RAM
Standard_A4_v2 A4 (v2) - 4 vCPUs - 8GB RAM
Standard_A4m_v2 A4m (v2) - 4 vCPUs - 32GB RAM
Standard_A5 A5 - 2 vCPUs - 14GB RAM
Standard_A6 A6 - 4 vCPUs - 28GB RAM
Standard_A7 A7 - 8 vCPUs - 56GB RAM
Standard_A8 A8 - 8 vCPUs - 56GB RAM
Standard_A8_v2 A8 (v2) - 8 vCPUs - 16GB RAM
Standard_A8m_v2 A8m (v2) - 8 vCPUs - 64GB RAM
Standard_A9 A9 - 16 vCPUs - 112GB RAM
Standard_A10 A10 - 8 vCPUs - 56GB RAM
Standard_A11 A11 - 16 vCPUs - 112GB RAM
Standard_B1ls B1ls - 1 vCPUs - 0.5GB RAM
Standard_B1ms B1ms - 1 vCPUs - 2GB RAM
Standard_B1s B1s - 1 vCPUs - 1GB RAM
Standard_B2ms B2ms - 2 vCPUs - 8GB RAM
Standard_B2s B2s - 2 vCPUs - 4GB RAM
Standard_B4ms B4ms - 4 vCPUs - 16GB RAM
Standard_B8ms B8ms - 8 vCPUs - 32GB RAM
Standard_B12ms B12ms - 12 vCPUs - 48GB RAM
Standard_B16ms B16ms - 16 vCPUs - 64GB RAM
Standard_B20ms B20ms - 20 vCPUs - 80GB RAM
Standard_D1 D1 - 1 vCPUs - 3.5GB RAM
Standard_D1_v2 D1 (v2) - 1 vCPUs - 3.5GB RAM
Standard_D2 D2 - 2 vCPUs - 7GB RAM
Standard_D2_v2 D2 (v2) - 2 vCPUs - 7GB RAM
Standard_D2_v2_Promo D2 (v2) Promo - 2 vCPUs - 7GB RAM
Standard_D2_v3 D2 (v3) - 2 vCPUs - 8GB RAM
Standard_D2a_v4 D2a (v4) - 2 vCPUs - 8GB RAM
Standard_D2as_v4 D2as (v4) - 2 vCPUs - 8GB RAM
Standard_D2s_v3 D2s (v3) - 2 vCPUs - 8GB RAM
Standard_D3 D3 - 4 vCPUs - 14GB RAM
Standard_D3_v2 D3 (v2) - 4 vCPUs - 14GB RAM
Standard_D3_v2_Promo D3 (v2) Promo - 4 vCPUs - 14GB RAM
Standard_D4 D4 - 8 vCPUs - 28GB RAM
Standard_D4_v2 D4 (v2) - 8 vCPUs - 28GB RAM
Standard_D4_v2_Promo D4 (v2) Promo - 8 vCPUs - 28GB RAM
Standard_D4_v3 D4 (v3) - 4 vCPUs - 16GB RAM
Standard_D4a_v4 D4a (v4) - 4 vCPUs - 16GB RAM
Standard_D4as_v4 D4as (v4) - 4 vCPUs - 16GB RAM
Standard_D4s_v3 D4s (v3) - 4 vCPUs - 16GB RAM
Standard_D5_v2 D5 (v2) - 16 vCPUs - 56GB RAM
Standard_D5_v2_Promo D5 (v2) Promo - 16 vCPUs - 56GB RAM
Standard_D8_v3 D8 (v3) - 8 vCPUs - 32GB RAM
Standard_D8a_v4 D8a (v4) - 8 vCPUs - 32GB RAM
Standard_D8as_v4 D8as (v4) - 8 vCPUs - 32GB RAM
Standard_D8s_v3 D8s (v3) - 8 vCPUs - 32GB RAM
Standard_D11 D11 - 2 vCPUs - 14GB RAM
Standard_D11_v2 D11 (v2) - 2 vCPUs - 14GB RAM
Standard_D11_v2_Promo D11 (v2) Promo - 2 vCPUs - 14GB RAM
Standard_D12 D12 - 4 vCPUs - 28GB RAM
Standard_D12_v2 D12 (v2) - 4 vCPUs - 28GB RAM
Standard_D12_v2_Promo D12 (v2) Promo - 4 vCPUs - 28GB RAM
Standard_D13 D13 - 8 vCPUs - 56GB RAM
Standard_D13_v2 D13 (v2) - 8 vCPUs - 56GB RAM
Standard_D13_v2_Promo D13 (v2) Promo - 8 vCPUs - 56GB RAM
Standard_D14 D14 - 16 vCPUs - 112GB RAM
Standard_D14_v2 D14 (v2) - 16 vCPUs - 112GB RAM
Standard_D14_v2_Promo D14 (v2) Promo - 16 vCPUs - 112GB RAM
Standard_D15_v2 D15 (v2) - 20 vCPUs - 140GB RAM
Standard_D16_v3 D16 (v3) - 16 vCPUs - 64GB RAM
Standard_D16a_v4 D16a (v4) - 16 vCPUs - 64GB RAM
Standard_D16as_v4 D16as (v4) - 16 vCPUs - 64GB RAM
Standard_D16s_v3 D16s (v3) - 16 vCPUs - 64GB RAM
Standard_D32_v3 D32 (v3) - 32 vCPUs - 128GB RAM
Standard_D32a_v4 D32a (v4) - 32 vCPUs - 128GB RAM
Standard_D32as_v4 D32as (v4) - 32 vCPUs - 128GB RAM
Standard_D32s_v3 D32s (v3) - 32 vCPUs - 128GB RAM
Standard_D48_v3 D48 (v3) - 48 vCPUs - 192GB RAM
Standard_D48a_v4 D48a (v4) - 48 vCPUs - 192GB RAM
Standard_D48as_v4 D48as (v4) - 48 vCPUs - 192GB RAM
Standard_D48s_v3 D48s (v3) - 48 vCPUs - 192GB RAM
Standard_D64_v3 D64 (v3) - 64 vCPUs - 256GB RAM
Standard_D64a_v4 D64a (v4) - 64 vCPUs - 256GB RAM
Standard_D64as_v4 D64as (v4) - 64 vCPUs - 256GB RAM
Standard_D64s_v3 D64s (v3) - 64 vCPUs - 256GB RAM
Standard_D96a_v4 D96a (v4) - 96 vCPUs - 384GB RAM
Standard_D96as_v4 D96as (v4) - 96 vCPUs - 384GB RAM
Standard_DC1s_v2 DC1s (v2) - 1 vCPUs - 4GB RAM
Standard_DC2s DC2s - 2 vCPUs - 8GB RAM
Standard_DC2s_v2 DC2s (v2) - 2 vCPUs - 8GB RAM
Standard_DC4s DC4s - 4 vCPUs - 16GB RAM
Standard_DC4s_v2 DC4s (v2) - 4 vCPUs - 16GB RAM
Standard_DC8_v2 DC8 (v2) - 8 vCPUs - 32GB RAM
Standard_DS1 DS1 - 1 vCPUs - 3.5GB RAM
Standard_DS1_v2 DS1 (v2) - 1 vCPUs - 3.5GB RAM
Standard_DS2 DS2 - 2 vCPUs - 7GB RAM
Standard_DS2_v2 DS2 (v2) - 2 vCPUs - 7GB RAM
Standard_DS2_v2_Promo DS2 (v2) Promo - 2 vCPUs - 7GB RAM
Standard_DS3 DS3 - 4 vCPUs - 14GB RAM
Standard_DS3_v2 DS3 (v2) - 4 vCPUs - 14GB RAM
Standard_DS3_v2_Promo DS3 (v2) Promo - 4 vCPUs - 14GB RAM
Standard_DS4 DS4 - 8 vCPUs - 28GB RAM
Standard_DS4_v2 DS4 (v2) - 8 vCPUs - 28GB RAM
Standard_DS4_v2_Promo DS4 (v2) Promo - 8 vCPUs - 28GB RAM
Standard_DS5_v2 DS5 (v2) - 16 vCPUs - 56GB RAM
Standard_DS5_v2_Promo DS5 (v2) Promo - 16 vCPUs - 56GB RAM
Standard_DS11 DS11 - 2 vCPUs - 14GB RAM
Standard_DS11-1_v2 DS11-1 (v2) - 2 vCPUs - 14GB RAM
Standard_DS11_v2 DS11 (v2) - 2 vCPUs - 14GB RAM
Standard_DS11_v2_Promo DS11 (v2) Promo - 2 vCPUs - 14GB RAM
Standard_DS12 DS12 - 4 vCPUs - 28GB RAM
Standard_DS12-1_v2 DS12-1 (v2) - 4 vCPUs - 28GB RAM
Standard_DS12-2_v2 DS12-2 (v2) - 4 vCPUs - 28GB RAM
Standard_DS12_v2 DS12 (v2) - 4 vCPUs - 28GB RAM
Standard_DS12_v2_Promo DS12 (v2) Promo - 4 vCPUs - 28GB RAM
Standard_DS13 DS13 - 8 vCPUs - 56GB RAM
Standard_DS13-2_v2 DS13-2 (v2) - 8 vCPUs - 56GB RAM
Standard_DS13-4_v2 DS13-4 (v2) - 8 vCPUs - 56GB RAM
Standard_DS13_v2 DS13 (v2) - 8 vCPUs - 56GB RAM
Standard_DS13_v2_Promo DS13 (v2) Promo - 8 vCPUs - 56GB RAM
Standard_DS14 DS14 - 16 vCPUs - 112GB RAM
Standard_DS14-4_v2 DS14-4 (v2) - 16 vCPUs - 112GB RAM
Standard_DS14-8_v2 DS14-8 (v2) - 16 vCPUs - 112GB RAM
Standard_DS14_v2 DS14 (v2) - 16 vCPUs - 112GB RAM
Standard_DS14_v2_Promo DS14 (v2) Promo - 16 vCPUs - 112GB RAM
Standard_DS15_v2 DS15 (v2) - 20 vCPUs - 140GB RAM
Standard_E2_v3 E2 (v3) - 2 vCPUs - 16GB RAM
Standard_E2a_v4 E2a (v4) - 2 vCPUs - 16GB RAM
Standard_E2as_v4 E2as (v4) - 2 vCPUs - 16GB RAM
Standard_E2s_v3 E2s (v3) - 2 vCPUs - 16GB RAM
Standard_E4-2s_v3 E4-2s (v3) - 4 vCPUs - 32GB RAM
Standard_E4_v3 E4 (v3) - 4 vCPUs - 32GB RAM
Standard_E4a_v4 E4a (v4) - 4 vCPUs - 32GB RAM
Standard_E4as_v4 E4as (v4) - 4 vCPUs - 32GB RAM
Standard_E4s_v3 E4s (v3) - 4 vCPUs - 32GB RAM
Standard_E8-2s_v3 E8-2s (v3) - 8 vCPUs - 64GB RAM
Standard_E8-4s_v3 E8-4s (v3) - 8 vCPUs - 64GB RAM
Standard_E8_v3 E8 (v3) - 8 vCPUs - 64GB RAM
Standard_E8a_v4 E8a (v4) - 8 vCPUs - 64GB RAM
Standard_E8as_v4 E8as (v4) - 8 vCPUs - 64GB RAM
Standard_E8s_v3 E8s (v3) - 8 vCPUs - 64GB RAM
Standard_E16-4s_v3 E16-4s (v3) - 16 vCPUs - 128GB RAM
Standard_E16-8s_v3 E16-8s (v3) - 16 vCPUs - 128GB RAM
Standard_E16_v3 E16 (v3) - 16 vCPUs - 128GB RAM
Standard_E16a_v4 E16a (v4) - 16 vCPUs - 128GB RAM
Standard_E16as_v4 E16as (v4) - 16 vCPUs - 128GB RAM
Standard_E16s_v3 E16s (v3) - 16 vCPUs - 128GB RAM
Standard_E20_v3 E20 (v3) - 20 vCPUs - 160GB RAM
Standard_E20a_v4 E20a (v4) - 20 vCPUs - 160GB RAM
Standard_E20as_v4 E20as (v4) - 20 vCPUs - 160GB RAM
Standard_E20s_v3 E20s (v3) - 20 vCPUs - 160GB RAM
Standard_E32-8s_v3 E32-8s (v3) - 32 vCPUs - 256GB RAM
Standard_E32-16s_v3 E32-16s (v3) - 32 vCPUs - 256GB RAM
Standard_E32_v3 E32 (v3) - 32 vCPUs - 256GB RAM
Standard_E32a_v4 E32a (v4) - 32 vCPUs - 256GB RAM
Standard_E32as_v4 E32as (v4) - 32 vCPUs - 256GB RAM
Standard_E32s_v3 E32s (v3) - 32 vCPUs - 256GB RAM
Standard_E48_v3 E48 (v3) - 48 vCPUs - 384GB RAM
Standard_E48a_v4 E48a (v4) - 48 vCPUs - 384GB RAM
Standard_E48as_v4 E48as (v4) - 48 vCPUs - 384GB RAM
Standard_E48s_v3 E48s (v3) - 48 vCPUs - 384GB RAM
Standard_E64-16s_v3 E64-16s (v3) - 64 vCPUs - 432GB RAM
Standard_E64-32s_v3 E64-32s (v3) - 64 vCPUs - 432GB RAM
Standard_E64_v3 E64 (v3) - 64 vCPUs - 432GB RAM
Standard_E64a_v4 E64a (v4) - 64 vCPUs - 432GB RAM
Standard_E64as_v4 E64as (v4) - 64 vCPUs - 432GB RAM
Standard_E64i_v3 E64i (v3) - 64 vCPUs - 432GB RAM
Standard_E64is_v3 E64is (v3) - 64 vCPUs - 432GB RAM
Standard_E64s_v3 E64s (v3) - 64 vCPUs - 432GB RAM
Standard_E96a_v4 E96a (v4) - 96 vCPUs - 672GB RAM
Standard_E96as_v4 E96as (v4) - 96 vCPUs - 672GB RAM
Standard_F1 F1 - 1 vCPUs - 2GB RAM
Standard_F1s F1s - 1 vCPUs - 2GB RAM
Standard_F2 F2 - 2 vCPUs - 4GB RAM
Standard_F2s F2s - 2 vCPUs - 4GB RAM
Standard_F2s_v2 F2s (v2) - 2 vCPUs - 4GB RAM
Standard_F4 F4 - 4 vCPUs - 8GB RAM
Standard_F4s F4s - 4 vCPUs - 8GB RAM
Standard_F4s_v2 F4s (v2) - 4 vCPUs - 8GB RAM
Standard_F8 F8 - 8 vCPUs - 16GB RAM
Standard_F8s F8s - 8 vCPUs - 16GB RAM
Standard_F8s_v2 F8s (v2) - 8 vCPUs - 16GB RAM
Standard_F16 F16 - 16 vCPUs - 32GB RAM
Standard_F16s F16s - 16 vCPUs - 32GB RAM
Standard_F16s_v2 F16s (v2) - 16 vCPUs - 32GB RAM
Standard_F32s_v2 F32s (v2) - 32 vCPUs - 64GB RAM
Standard_F48s_v2 F48s (v2) - 48 vCPUs - 96GB RAM
Standard_F64s_v2 F64s (v2) - 64 vCPUs - 128GB RAM
Standard_F72s_v2 F72s (v2) - 72 vCPUs - 144GB RAM
Standard_G1 G1 - 2 vCPUs - 28GB RAM
Standard_G2 G2 - 4 vCPUs - 56GB RAM
Standard_G3 G3 - 8 vCPUs - 112GB RAM
Standard_G4 G4 - 16 vCPUs - 224GB RAM
Standard_G5 G5 - 32 vCPUs - 448GB RAM
Standard_GS1 GS1 - 2 vCPUs - 28GB RAM
Standard_GS2 GS2 - 4 vCPUs - 56GB RAM
Standard_GS3 GS3 - 8 vCPUs - 112GB RAM
Standard_GS4 GS4 - 16 vCPUs - 224GB RAM
Standard_GS4-4 GS4-4 - 16 vCPUs - 224GB RAM
Standard_GS4-8 GS4-8 - 16 vCPUs - 224GB RAM
Standard_GS5 GS5 - 32 vCPUs - 448GB RAM
Standard_GS5-8 GS5-8 - 32 vCPUs - 448GB RAM
Standard_GS5-16 GS5-16 - 32 vCPUs - 448GB RAM
Standard_H8 H8 - 8 vCPUs - 56GB RAM
Standard_H8_Promo H8 Promo - 8 vCPUs - 56GB RAM
Standard_H8m H8m - 8 vCPUs - 112GB RAM
Standard_H8m_Promo H8m Promo - 8 vCPUs - 112GB RAM
Standard_H16 H16 - 16 vCPUs - 112GB RAM
Standard_H16_Promo H16 Promo - 16 vCPUs - 112GB RAM
Standard_H16m H16m - 16 vCPUs - 224GB RAM
Standard_H16m_Promo H16m Promo - 16 vCPUs - 224GB RAM
Standard_H16mr H16mr - 16 vCPUs - 224GB RAM
Standard_H16mr_Promo H16mr Promo - 16 vCPUs - 224GB RAM
Standard_H16r H16r - 16 vCPUs - 112GB RAM
Standard_H16r_Promo H16r Promo - 16 vCPUs - 112GB RAM
Standard_HB60rs HB60rs - 60 vCPUs - 224GB RAM
Standard_HB120rs_v2 HB120rs (v2) - 120 vCPUs - 469GB RAM
Standard_HC44rs HC44rs - 44 vCPUs - 328GB RAM
Standard_L4s L4s - 4 vCPUs - 32GB RAM
Standard_L8s L8s - 8 vCPUs - 64GB RAM
Standard_L8s_v2 L8s (v2) - 8 vCPUs - 64GB RAM
Standard_L16s L16s - 16 vCPUs - 128GB RAM
Standard_L16s_v2 L16s (v2) - 16 vCPUs - 128GB RAM
Standard_L32s L32s - 32 vCPUs - 256GB RAM
Standard_L32s_v2 L32s (v2) - 32 vCPUs - 256GB RAM
Standard_L48s_v2 L48s (v2) - 48 vCPUs - 384GB RAM
Standard_L64s_v2 L64s (v2) - 64 vCPUs - 512GB RAM
Standard_L80s_v2 L80s (v2) - 80 vCPUs - 640GB RAM
Standard_M8-2ms M8-2ms - 8 vCPUs - 219GB RAM
Standard_M8-4ms M8-4ms - 8 vCPUs - 219GB RAM
Standard_M8ms M8ms - 8 vCPUs - 219GB RAM
Standard_M16-4ms M16-4ms - 16 vCPUs - 438GB RAM
Standard_M16-8ms M16-8ms - 16 vCPUs - 438GB RAM
Standard_M16ms M16ms - 16 vCPUs - 438GB RAM
Standard_M24ms_v2 M24ms (v2) - 24 vCPUs - 537GB RAM
Standard_M24s_v2 M24s (v2) - 24 vCPUs - 268GB RAM
Standard_M32-8ms M32-8ms - 32 vCPUs - 875GB RAM
Standard_M32-16ms M32-16ms - 32 vCPUs - 875GB RAM
Standard_M32ls M32ls - 32 vCPUs - 256GB RAM
Standard_M32ms M32ms - 32 vCPUs - 875GB RAM
Standard_M32ts M32ts - 32 vCPUs - 192GB RAM
Standard_M48ms_v2 M48ms (v2) - 48 vCPUs - 1074GB RAM
Standard_M48s_v2 M48s (v2) - 48 vCPUs - 537GB RAM
Standard_M64 M64 - 64 vCPUs - 1000GB RAM
Standard_M64-16ms M64-16ms - 64 vCPUs - 1750GB RAM
Standard_M64-32ms M64-32ms - 64 vCPUs - 1750GB RAM
Standard_M64ls M64ls - 64 vCPUs - 512GB RAM
Standard_M64m M64m - 64 vCPUs - 1750GB RAM
Standard_M64ms M64ms - 64 vCPUs - 1750GB RAM
Standard_M64s M64s - 64 vCPUs - 1000GB RAM
Standard_M96ms_v2 M96ms (v2) - 96 vCPUs - 7516GB RAM
Standard_M96s_v2 M96s (v2) - 96 vCPUs - 1074GB RAM
Standard_M128 M128 - 128 vCPUs - 2000GB RAM
Standard_M128-32ms M128-32ms - 128 vCPUs - 3800GB RAM
Standard_M128-64ms M128-64ms - 128 vCPUs - 3800GB RAM
Standard_M128m M128m - 128 vCPUs - 3800GB RAM
Standard_M128ms M128ms - 128 vCPUs - 3800GB RAM
Standard_M128s M128s - 128 vCPUs - 2000GB RAM
Standard_M192ms_v2 M192ms (v2) - 192 vCPUs - 4295GB RAM
Standard_M192s_v2 M192s (v2) - 192 vCPUs - 2147GB RAM
Standard_M208ms_v2 M208ms (v2) - 208 vCPUs - 5700GB RAM
Standard_M208s_v2 M208s (v2) - 208 vCPUs - 2850GB RAM
Standard_M416ms_v2 M416ms (v2) - 416 vCPUs - 11400GB RAM
Standard_M416s_v2 M416s (v2) - 416 vCPUs - 5700GB RAM
Standard_NC6 NC6 - 6 vCPUs - 56GB RAM
Standard_NC6_Promo NC6 Promo - 6 vCPUs - 56GB RAM
Standard_NC6s_v2 NC6s (v2) - 6 vCPUs - 112GB RAM
Standard_NC6s_v3 NC6s (v3) - 6 vCPUs - 112GB RAM
Standard_NC12 NC12 - 12 vCPUs - 112GB RAM
Standard_NC12_Promo NC12 Promo - 12 vCPUs - 112GB RAM
Standard_NC12s_v2 NC12s (v2) - 12 vCPUs - 224GB RAM
Standard_NC12s_v3 NC12s (v3) - 12 vCPUs - 224GB RAM
Standard_NC24 NC24 - 24 vCPUs - 224GB RAM
Standard_NC24_Promo NC24 Promo - 24 vCPUs - 224GB RAM
Standard_NC24r NC24r - 24 vCPUs - 224GB RAM
Standard_NC24r_Promo NC24r Promo - 24 vCPUs - 224GB RAM
Standard_NC24rs_v2 NC24rs (v2) - 24 vCPUs - 448GB RAM
Standard_NC24rs_v3 NC24rs (v3) - 24 vCPUs - 448GB RAM
Standard_NC24s_v2 NC24s (v2) - 24 vCPUs - 448GB RAM
Standard_NC24s_v3 NC24s (v3) - 24 vCPUs - 448GB RAM
Standard_ND6s ND6s - 6 vCPUs - 112GB RAM
Standard_ND12s ND12s - 12 vCPUs - 224GB RAM
Standard_ND24rs ND24rs - 24 vCPUs - 448GB RAM
Standard_ND24s ND24s - 24 vCPUs - 448GB RAM
Standard_ND40rs_v2 ND40rs (v2) - 40 vCPUs - 672GB RAM
Standard_ND40s_v3 ND40s (v3) - 40 vCPUs - 672GB RAM
Standard_NP10s NP10s - 10 vCPUs - 168GB RAM
Standard_NP20s NP20s - 20 vCPUs - 336GB RAM
Standard_NP40s NP40s - 40 vCPUs - 672GB RAM
Standard_NV4as_v4 NV4as (v4) - 4 vCPUs - 14GB RAM
Standard_NV6 NV6 - 6 vCPUs - 56GB RAM
Standard_NV6_Promo NV6 Promo - 6 vCPUs - 56GB RAM
Standard_NV6s_v2 NV6s (v2) - 6 vCPUs - 112GB RAM
Standard_NV8as_v4 NV8as (v4) - 8 vCPUs - 28GB RAM
Standard_NV12 NV12 - 12 vCPUs - 112GB RAM
Standard_NV12_Promo NV12 Promo - 12 vCPUs - 112GB RAM
Standard_NV12s_v2 NV12s (v2) - 12 vCPUs - 224GB RAM
Standard_NV12s_v3 NV12s (v3) - 12 vCPUs - 112GB RAM
Standard_NV16as_v4 NV16as (v4) - 16 vCPUs - 56GB RAM
Standard_NV24 NV24 - 24 vCPUs - 224GB RAM
Standard_NV24_Promo NV24 Promo - 24 vCPUs - 224GB RAM
Standard_NV24s_v2 NV24s (v2) - 24 vCPUs - 448GB RAM
Standard_NV24s_v3 NV24s (v3) - 24 vCPUs - 224GB RAM
Standard_NV32as_v4 NV32as (v4) - 32 vCPUs - 112GB RAM
Standard_NV48s_v3 NV48s (v3) - 48 vCPUs - 448GB RAM
Standard_PB6s PB6s - 6 vCPUs - 112GB RAM

CloudA Cloud

Key Description
512 MB 512 MB - General Purpose
1 GB 1 GB - General Purpose
2 GB 2 GB - General Purpose
4 GB 4 GB - General Purpose
8 GB 8 GB - General Purpose
16 GB 16 GB - General Purpose
32 GB 32 GB - General Purpose
8 GB - HM 8 GB - High Memory
16 GB - HM 16 GB - High Memory
32 GB - HM 32 GB - High Memory
4 GB - HC 4 GB - High Compute
8 GB - HC 8 GB - High Compute
16 GB - HC 16 GB - High Compute

DigitalOcean

Key Description
s-1vcpu-1gb Standard Droplet - 1 vCPUs - 1GB RAM - 25GB SSD - 1TB Transfer
s-1vcpu-2gb Standard Droplet - 1 vCPUs - 2GB RAM - 50GB SSD - 2TB Transfer
s-1vcpu-3gb Standard Droplet - 1 vCPUs - 3,072MB RAM - 60GB SSD - 3TB Transfer
m-1vcpu-8gb Optimized Droplet - 1 vCPUs - 8GB RAM - 40GB SSD - 5TB Transfer
s-2vcpu-2gb Standard Droplet - 2 vCPUs - 2GB RAM - 60GB SSD - 3TB Transfer
s-2vcpu-4gb Standard Droplet - 2 vCPUs - 4GB RAM - 80GB SSD - 4TB Transfer
c-2 Optimized Droplet - 2 vCPUs - 4GB RAM - 25GB SSD - 4TB Transfer
gd-2vcpu-8gb Optimized Droplet - 2 vCPUs - 8GB RAM - 50GB SSD - 4TB Transfer
g-2vcpu-8gb Optimized Droplet - 2 vCPUs - 8GB RAM - 25GB SSD - 4TB Transfer
m6-2vcpu-16gb Optimized Droplet - 2 vCPUs - 16GB RAM - 300GB SSD - 4TB Transfer
m-16gb Optimized Droplet - 2 vCPUs - 16GB RAM - 60GB SSD - 5TB Transfer
m-2vcpu-16gb Optimized Droplet - 2 vCPUs - 16GB RAM - 50GB SSD - 4TB Transfer
m3-2vcpu-16gb Optimized Droplet - 2 vCPUs - 16GB RAM - 150GB SSD - 4TB Transfer
s-3vcpu-1gb Standard Droplet - 3 vCPUs - 1GB RAM - 60GB SSD - 3TB Transfer
s-4vcpu-8gb Standard Droplet - 4 vCPUs - 8GB RAM - 160GB SSD - 5TB Transfer
c-4 Optimized Droplet - 4 vCPUs - 8GB RAM - 50GB SSD - 5TB Transfer
g-4vcpu-16gb Optimized Droplet - 4 vCPUs - 16GB RAM - 50GB SSD - 5TB Transfer
gd-4vcpu-16gb Optimized Droplet - 4 vCPUs - 16GB RAM - 100GB SSD - 5TB Transfer
m3-4vcpu-32gb Optimized Droplet - 4 vCPUs - 32GB RAM - 300GB SSD - 6TB Transfer
m-32gb Optimized Droplet - 4 vCPUs - 32GB RAM - 90GB SSD - 5TB Transfer
m-4vcpu-32gb Optimized Droplet - 4 vCPUs - 32GB RAM - 100GB SSD - 6TB Transfer
m6-4vcpu-32gb Optimized Droplet - 4 vCPUs - 32GB RAM - 600GB SSD - 6TB Transfer
s-6vcpu-16gb Standard Droplet - 6 vCPUs - 16GB RAM - 320GB SSD - 6TB Transfer
c-8 Optimized Droplet - 8 vCPUs - 16GB RAM - 100GB SSD - 6TB Transfer
g-8vcpu-32gb Optimized Droplet - 8 vCPUs - 32GB RAM - 100GB SSD - 6TB Transfer
s-8vcpu-32gb Standard Droplet - 8 vCPUs - 32GB RAM - 640GB SSD - 7TB Transfer
gd-8vcpu-32gb Optimized Droplet - 8 vCPUs - 32GB RAM - 200GB SSD - 6TB Transfer
m6-8vcpu-64gb Optimized Droplet - 8 vCPUs - 64GB RAM - 1,200GB SSD - 7TB Transfer
m-64gb Optimized Droplet - 8 vCPUs - 64GB RAM - 200GB SSD - 5TB Transfer
m-8vcpu-64gb Optimized Droplet - 8 vCPUs - 64GB RAM - 200GB SSD - 7TB Transfer
m3-8vcpu-64gb Optimized Droplet - 8 vCPUs - 64GB RAM - 600GB SSD - 7TB Transfer
s-12vcpu-48gb Standard Droplet - 12 vCPUs - 49,152MB RAM - 960GB SSD - 8TB Transfer
c-16 Optimized Droplet - 16 vCPUs - 32GB RAM - 200GB SSD - 7TB Transfer
g-16vcpu-64gb Optimized Droplet - 16 vCPUs - 64GB RAM - 200GB SSD - 7TB Transfer
gd-16vcpu-64gb Optimized Droplet - 16 vCPUs - 64GB RAM - 400GB SSD - 7TB Transfer
s-16vcpu-64gb Standard Droplet - 16 vCPUs - 64GB RAM - 1,280GB SSD - 9TB Transfer
m-16vcpu-128gb Optimized Droplet - 16 vCPUs - 128GB RAM - 400GB SSD - 8TB Transfer
m-128gb Optimized Droplet - 16 vCPUs - 128GB RAM - 340GB SSD - 5TB Transfer
m6-16vcpu-128gb Optimized Droplet - 16 vCPUs - 128GB RAM - 2,400GB SSD - 8TB Transfer
m3-16vcpu-128gb Optimized Droplet - 16 vCPUs - 128GB RAM - 1,200GB SSD - 8TB Transfer
s-20vcpu-96gb Standard Droplet - 20 vCPUs - 98,304MB RAM - 1,920GB SSD - 10TB Transfer
s-24vcpu-128gb Standard Droplet - 24 vCPUs - 128GB RAM - 2,560GB SSD - 11TB Transfer
m3-24vcpu-192gb Optimized Droplet - 24 vCPUs - 196GB RAM - 1,800GB SSD - 9TB Transfer
m-24vcpu-192gb Optimized Droplet - 24 vCPUs - 196GB RAM - 600GB SSD - 9TB Transfer
m6-24vcpu-192gb Optimized Droplet - 24 vCPUs - 196GB RAM - 3,600GB SSD - 9TB Transfer
c-32 Optimized Droplet - 32 vCPUs - 64GB RAM - 400GB SSD - 9TB Transfer
g-32vcpu-128gb Optimized Droplet - 32 vCPUs - 128GB RAM - 400GB SSD - 8TB Transfer
gd-32vcpu-128gb Optimized Droplet - 32 vCPUs - 128GB RAM - 800GB SSD - 8TB Transfer
s-32vcpu-192gb Standard Droplet - 32 vCPUs - 196GB RAM - 3,840GB SSD - 12TB Transfer
m-224gb Optimized Droplet - 32 vCPUs - 229,376MB RAM - 500GB SSD - 5TB Transfer
gd-40vcpu-160gb Optimized Droplet - 40 vCPUs - 163,840MB RAM - 1,000GB SSD - 9TB Transfer
512mb [LEGACY] 1 vCPUs - 512MB RAM - 20GB SSD - 1TB Transfer
1gb [LEGACY] 1 vCPUs - 1GB RAM - 30GB SSD - 2TB Transfer
2gb [LEGACY] 2 vCPUs - 2GB RAM - 40GB SSD - 3TB Transfer
4gb [LEGACY] 2 vCPUs - 4GB RAM - 60GB SSD - 4TB Transfer
8gb [LEGACY] 4 vCPUs - 8GB RAM - 80GB SSD - 5TB Transfer
16gb [LEGACY] 8 vCPUs - 16GB RAM - 160GB SSD - 6TB Transfer
32gb [LEGACY] 12 vCPUs - 32GB RAM - 320GB SSD - 7TB Transfer
48gb [LEGACY] 16 vCPUs - 48GB RAM - 480GB SSD - 8TB Transfer
64gb [LEGACY] 20 vCPUs - 64GB RAM - 640GB SSD - 9TB Transfer

Google Compute Engine

Key Description
c2-standard-16 c2-standard-16 - 16 vCPUs - 64GB RAM
c2-standard-30 c2-standard-30 - 30 vCPUs - 122,880MB RAM
c2-standard-4 c2-standard-4 - 4 vCPUs - 16GB RAM
c2-standard-60 c2-standard-60 - 60 vCPUs - 245,760MB RAM
c2-standard-8 c2-standard-8 - 8 vCPUs - 32GB RAM
e2-highcpu-16 e2-highcpu-16 - 16 vCPUs - 16GB RAM
e2-highcpu-2 e2-highcpu-2 - 2 vCPUs - 2GB RAM
e2-highcpu-4 e2-highcpu-4 - 4 vCPUs - 4GB RAM
e2-highcpu-8 e2-highcpu-8 - 8 vCPUs - 8GB RAM
e2-highmem-16 e2-highmem-16 - 16 vCPUs - 128GB RAM
e2-highmem-2 e2-highmem-2 - 2 vCPUs - 16GB RAM
e2-highmem-4 e2-highmem-4 - 4 vCPUs - 32GB RAM
e2-highmem-8 e2-highmem-8 - 8 vCPUs - 64GB RAM
e2-medium e2-medium - 2 vCPUs - 4GB RAM
e2-micro e2-micro - 2 vCPUs - 1GB RAM
e2-small e2-small - 2 vCPUs - 2GB RAM
e2-standard-16 e2-standard-16 - 16 vCPUs - 64GB RAM
e2-standard-2 e2-standard-2 - 2 vCPUs - 8GB RAM
e2-standard-4 e2-standard-4 - 4 vCPUs - 16GB RAM
e2-standard-8 e2-standard-8 - 8 vCPUs - 32GB RAM
f1-micro f1-micro - 1 vCPU - 614MB RAM
g1-small g1-small - 1 vCPU - 1,740MB RAM
m1-megamem-96 m1-megamem-96 - 96 vCPUs - 1,468,006MB RAM
m1-ultramem-160 m1-ultramem-160 - 160 vCPUs - 3,936,256MB RAM
m1-ultramem-40 m1-ultramem-40 - 40 vCPUs - 984,064MB RAM
m1-ultramem-80 m1-ultramem-80 - 80 vCPUs - 1,968,128MB RAM
n1-highcpu-16 n1-highcpu-16 - 16 vCPUs - 14,746MB RAM
n1-highcpu-2 n1-highcpu-2 - 2 vCPUs - 1,843MB RAM
n1-highcpu-32 n1-highcpu-32 - 32 vCPUs - 29,491MB RAM
n1-highcpu-4 n1-highcpu-4 - 4 vCPUs - 3,686MB RAM
n1-highcpu-64 n1-highcpu-64 - 64 vCPUs - 58,982MB RAM
n1-highcpu-8 n1-highcpu-8 - 8 vCPUs - 7,373MB RAM
n1-highcpu-96 n1-highcpu-96 - 96 vCPUs - 88,474MB RAM
n1-highmem-16 n1-highmem-16 - 16 vCPUs - 106,496MB RAM
n1-highmem-2 n1-highmem-2 - 2 vCPUs - 13,312MB RAM
n1-highmem-32 n1-highmem-32 - 32 vCPUs - 212,992MB RAM
n1-highmem-4 n1-highmem-4 - 4 vCPUs - 26,624MB RAM
n1-highmem-64 n1-highmem-64 - 64 vCPUs - 425,984MB RAM
n1-highmem-8 n1-highmem-8 - 8 vCPUs - 53,248MB RAM
n1-highmem-96 n1-highmem-96 - 96 vCPUs - 638,976MB RAM
n1-megamem-96 n1-megamem-96 - 96 vCPUs - 1,468,006MB RAM
n1-standard-1 n1-standard-1 - 1 vCPU - 3,840MB RAM
n1-standard-16 n1-standard-16 - 16 vCPUs - 61,440MB RAM
n1-standard-2 n1-standard-2 - 2 vCPUs - 7,680MB RAM
n1-standard-32 n1-standard-32 - 32 vCPUs - 122,880MB RAM
n1-standard-4 n1-standard-4 - 4 vCPUs - 15,360MB RAM
n1-standard-64 n1-standard-64 - 64 vCPUs - 245,760MB RAM
n1-standard-8 n1-standard-8 - 8 vCPUs - 30,720MB RAM
n1-standard-96 n1-standard-96 - 96 vCPUs - 368,640MB RAM
n1-ultramem-160 n1-ultramem-160 - 160 vCPUs - 3,936,256MB RAM
n1-ultramem-40 n1-ultramem-40 - 40 vCPUs - 984,064MB RAM
n1-ultramem-80 n1-ultramem-80 - 80 vCPUs - 1,968,128MB RAM
n2-highcpu-16 n2-highcpu-16 - 16 vCPUs - 16GB RAM
n2-highcpu-2 n2-highcpu-2 - 2 vCPUs - 2GB RAM
n2-highcpu-32 n2-highcpu-32 - 32 vCPUs - 32GB RAM
n2-highcpu-4 n2-highcpu-4 - 4 vCPUs - 4GB RAM
n2-highcpu-48 n2-highcpu-48 - 48 vCPUs - 49,152MB RAM
n2-highcpu-64 n2-highcpu-64 - 64 vCPUs - 64GB RAM
n2-highcpu-8 n2-highcpu-8 - 8 vCPUs - 8GB RAM
n2-highcpu-80 n2-highcpu-80 - 80 vCPUs - 81,920MB RAM
n2-highmem-16 n2-highmem-16 - 16 vCPUs - 128GB RAM
n2-highmem-2 n2-highmem-2 - 2 vCPUs - 16GB RAM
n2-highmem-32 n2-highmem-32 - 32 vCPUs - 262,144MB RAM
n2-highmem-4 n2-highmem-4 - 4 vCPUs - 32GB RAM
n2-highmem-48 n2-highmem-48 - 48 vCPUs - 393,216MB RAM
n2-highmem-64 n2-highmem-64 - 64 vCPUs - 524,288MB RAM
n2-highmem-8 n2-highmem-8 - 8 vCPUs - 64GB RAM
n2-highmem-80 n2-highmem-80 - 80 vCPUs - 655,360MB RAM
n2-standard-16 n2-standard-16 - 16 vCPUs - 64GB RAM
n2-standard-2 n2-standard-2 - 2 vCPUs - 8GB RAM
n2-standard-32 n2-standard-32 - 32 vCPUs - 128GB RAM
n2-standard-4 n2-standard-4 - 4 vCPUs - 16GB RAM
n2-standard-48 n2-standard-48 - 48 vCPUs - 196GB RAM
n2-standard-64 n2-standard-64 - 64 vCPUs - 262,144MB RAM
n2-standard-8 n2-standard-8 - 8 vCPUs - 32GB RAM
n2-standard-80 n2-standard-80 - 80 vCPUs - 327,680MB RAM

Hetzner

Key Description
11 Dedicated - CCX11 - 2 vCPUs - 8.0 GB RAM - 80 GB disk
12 Dedicated - CCX21 - 4 vCPUs - 16.0 GB RAM - 160 GB disk
13 Dedicated - CCX31 - 8 vCPUs - 32.0 GB RAM - 240 GB disk
14 Dedicated - CCX41 - 16 vCPUs - 64.0 GB RAM - 360 GB disk
15 Dedicated - CCX51 - 32 vCPUs - 128.0 GB RAM - 600 GB disk
3 Local storage - CX21 - 2 vCPUs - 4.0 GB RAM - 40 GB disk
5 Local storage - CX31 - 2 vCPUs - 8.0 GB RAM - 80 GB disk
22 Local storage - CPX11 - 2 vCPUs - 2.0 GB RAM - 40 GB disk
23 Local storage - CPX21 - 3 vCPUs - 4.0 GB RAM - 80 GB disk
7 Local storage - CX41 - 4 vCPUs - 16.0 GB RAM - 160 GB disk
24 Local storage - CPX31 - 4 vCPUs - 8.0 GB RAM - 160 GB disk
9 Local storage - CX51 - 8 vCPUs - 32.0 GB RAM - 240 GB disk
25 Local storage - CPX41 - 8 vCPUs - 16.0 GB RAM - 240 GB disk
26 Local storage - CPX51 - 16 vCPUs - 32.0 GB RAM - 360 GB disk
4 Network storage - CX21-CEPH - 2 vCPUs - 4.0 GB RAM - 40 GB disk
6 Network storage - CX31-CEPH - 2 vCPUs - 8.0 GB RAM - 80 GB disk
8 Network storage - CX41-CEPH - 4 vCPUs - 16.0 GB RAM - 160 GB disk
10 Network storage - CX51-CEPH - 8 vCPUs - 32.0 GB RAM - 240 GB disk

Linode

Key Description
Nanode 1GB Nanode 1GB
Linode 2GB Linode 2GB
Linode 4GB Linode 4GB
Linode 8GB Linode 8GB
Linode 16GB Linode 16GB
Linode 32GB Linode 32GB
Linode 64GB Linode 64GB
Linode 96GB Linode 96GB
Linode 128GB Linode 128GB
Linode 192GB Linode 192GB
Linode 24GB Linode 24GB
Linode 48GB Linode 48GB
Linode 90GB Linode 90GB
Linode 150GB Linode 150GB
Linode 300GB Linode 300GB

OVH

Key Description
b2-7 b2-7 - 50GB Disk - 2 vCPUs - 7GB RAM
b2-15 b2-15 - 100GB Disk - 4 vCPUs - 15GB RAM
b2-30 b2-30 - 200GB Disk - 8 vCPUs - 30GB RAM
b2-60 b2-60 - 400GB Disk - 16 vCPUs - 60GB RAM
b2-120 b2-120 - 400GB Disk - 32 vCPUs - 120GB RAM
c2-7 c2-7 - 50GB Disk - 2 vCPUs - 7GB RAM
c2-15 c2-15 - 100GB Disk - 4 vCPUs - 15GB RAM
c2-30 c2-30 - 200GB Disk - 8 vCPUs - 30GB RAM
c2-60 c2-60 - 400GB Disk - 16 vCPUs - 60GB RAM
c2-120 c2-120 - 400GB Disk - 32 vCPUs - 120GB RAM
i1-45 i1-45 - 50GB Disk - 8 vCPUs - 45GB RAM
i1-90 i1-90 - 50GB Disk - 16 vCPUs - 90GB RAM
i1-180 i1-180 - 50GB Disk - 32 vCPUs - 180GB RAM
r2-15 r2-15 - 50GB Disk - 2 vCPUs - 15GB RAM
r2-30 r2-30 - 50GB Disk - 2 vCPUs - 30GB RAM
r2-60 r2-60 - 100GB Disk - 4 vCPUs - 60GB RAM
r2-120 r2-120 - 200GB Disk - 8 vCPUs - 120GB RAM
r2-240 r2-240 - 400GB Disk - 16 vCPUs - 240GB RAM
s1-2 s1-2 - 10GB Disk - 1 vCPU - 2GB RAM
s1-4 s1-4 - 20GB Disk - 1 vCPU - 4GB RAM
s1-8 s1-8 - 40GB Disk - 2 vCPUs - 8GB RAM
t1-45 t1-45 - 400GB Disk - 8 vCPUs - 45GB RAM
t1-90 t1-90 - 800GB Disk - 16 vCPUs - 90GB RAM
t1-180 t1-180 - 50GB Disk - 32 vCPUs - 180GB RAM

Packet

Key Description
baremetal_0 t1.small.x86
baremetal_1 c1.small.x86
baremetal_1e x1.small.x86
c2.medium.x86 c2.medium.x86
baremetal_s s1.large.x86
baremetal_3 c1.xlarge.x86
baremetal_2 m1.xlarge.x86
m2.xlarge.x86 m2.xlarge.x86
n2.xlarge.x86 n2.xlarge.x86
x2.xlarge.x86 x2.xlarge.x86

Rackspace

Key Description
512MB Standard Instance 512MB Standard Instance
1GB Standard Instance 1GB Standard Instance
2GB Standard Instance 2GB Standard Instance
4GB Standard Instance 4GB Standard Instance
8GB Standard Instance 8GB Standard Instance
15GB Standard Instance 15GB Standard Instance
30GB Standard Instance 30GB Standard Instance
3.75 GB Compute v1 3.75 GB Compute v1
7.5 GB Compute v1 7.5 GB Compute v1
15 GB Compute v1 15 GB Compute v1
30 GB Compute v1 30 GB Compute v1
60 GB Compute v1 60 GB Compute v1
1 GB General Purpose v1 1 GB General Purpose v1
2 GB General Purpose v1 2 GB General Purpose v1
4 GB General Purpose v1 4 GB General Purpose v1
8 GB General Purpose v1 8 GB General Purpose v1
15 GB I/O v1 15 GB I/O v1
30 GB I/O v1 30 GB I/O v1
60 GB I/O v1 60 GB I/O v1
90 GB I/O v1 90 GB I/O v1
120 GB I/O v1 120 GB I/O v1
15 GB Memory v1 15 GB Memory v1
30 GB Memory v1 30 GB Memory v1
60 GB Memory v1 60 GB Memory v1
120 GB Memory v1 120 GB Memory v1
240 GB Memory v1 240 GB Memory v1
1 GB Performance 1 GB Performance
2 GB Performance 2 GB Performance
4 GB Performance 4 GB Performance
8 GB Performance 8 GB Performance
15 GB Performance 15 GB Performance
30 GB Performance 30 GB Performance
60 GB Performance 60 GB Performance
90 GB Performance 90 GB Performance
120 GB Performance 120 GB Performance

Vultr

Key Description
201 Cloud Compute - 1 vCPUs - 1GB RAM - 25 GB SSD - 1GB TB BW
202 Cloud Compute - 1 vCPUs - 2GB RAM - 55 GB SSD - 22GB TB BW
203 Cloud Compute - 2 vCPUs - 4GB RAM - 80 GB SSD - 32GB TB BW
204 Cloud Compute - 4 vCPUs - 8GB RAM - 160 GB SSD - 42GB TB BW
205 Cloud Compute - 6 vCPUs - 16GB RAM - 320 GB SSD - 52GB TB BW
206 Cloud Compute - 8 vCPUs - 32GB RAM - 640 GB SSD - 62GB TB BW
207 Cloud Compute - 16 vCPUs - 65536 MB RAM - 1280 GB SSD - 102GB TB BW
208 Cloud Compute - 24 vCPUs - 98304 MB RAM - 1600 GB SSD - 152GB TB BW
115 Dedicate - 2 vCPUs - 8GB RAM - 110 GB SSD - 102GB TB BW
116 Dedicate - 4 vCPUs - 16GB RAM - 2x110 GB SSD - 202GB TB BW
117 Dedicate - 6 vCPUs - 24GB RAM - 3x110 GB SSD - 302GB TB BW
118 Dedicate - 8 vCPUs - 32GB RAM - 4x110 GB SSD - 402GB TB BW
401 High Frequency - 1 vCPUs - 2GB RAM - 64 GB SSD - 22GB TB BW
402 High Frequency - 2 vCPUs - 4GB RAM - 128 GB SSD - 32GB TB BW
403 High Frequency - 3 vCPUs - 8GB RAM - 256 GB SSD - 42GB TB BW
404 High Frequency - 4 vCPUs - 16GB RAM - 384 GB SSD - 52GB TB BW
405 High Frequency - 8 vCPUs - 32GB RAM - 512 GB SSD - 62GB TB BW
406 High Frequency - 12 vCPUs - 49152 MB RAM - 768 GB SSD - 82GB TB BW

Cloud vendor instance regions

Amazon Web Services

Key Description
us-east-1 US East (Northern Virginia)
us-east-2 US East (Ohio)
ap-south-1 Asia Pacific (Mumbai)
eu-west-3 Europe (Paris)
eu-west-2 Europe (London)
eu-west-1 Europe (Dublin, Ireland)
eu-north-1 Europe (Stockholm)
ap-northeast-1 Asia Pacific (Tokyo)
ap-northeast-2 Asia Pacific (Seoul)
sa-east-1 South America (Sao Paulo, Brazil)
ca-central-1 Canada (Central)
ap-southeast-1 Asia Pacific (Singapore)
ap-southeast-2 Asia Pacific (Sydney)
eu-central-1 Europe (Frankfurt, Germany)
us-west-1 US West (Northern California)
us-west-2 US West (Oregon)

Azure

Key Description
australiacentral Australia Central
australiacentral2 Australia Central 2
australiaeast Australia East
australiasoutheast Australia Southeast
brazilsouth Brazil South
canadacentral Canada Central
canadaeast Canada East
centralindia Central India
centralus Central US
eastasia East Asia
eastus East US
eastus2 East US 2
francecentral France Central
francesouth France South
germanynorth Germany North
germanywestcentral Germany West Central
japaneast Japan East
japanwest Japan West
koreacentral Korea Central
koreasouth Korea South
northcentralus North Central US
northeurope North Europe
norwayeast Norway East
norwaywest Norway West
southafricanorth South Africa North
southafricawest South Africa West
southcentralus South Central US
southindia South India
southeastasia Southeast Asia
switzerlandnorth Switzerland North
switzerlandwest Switzerland West
uaecentral UAE Central
uaenorth UAE North
uksouth UK South
ukwest UK West
westcentralus West Central US
westeurope West Europe
westindia West India
westus West US
westus2 West US 2

CloudA Cloud

Key Description
default default

DigitalOcean

Key Description
ams2 Amsterdam 2, Netherlands
ams3 Amsterdam 3, Netherlands
blr1 Bangalore, IN
fra1 Frankfurt, Germany
lon1 London, UK
nyc1 New York, US
nyc2 New York 2, US
nyc3 New York 3, US
sfo1 San Francisco, US
sfo2 San Francisco 2, US
sgp1 Singapore
tor1 Toronto, CA

GCE

Key Description
asia-east1-a asia-east1-a
asia-east1-b asia-east1-b
asia-east1-c asia-east1-c
asia-east2-a asia-east2-a
asia-east2-b asia-east2-b
asia-east2-c asia-east2-c
asia-northeast1-a asia-northeast1-a
asia-northeast1-b asia-northeast1-b
asia-northeast1-c asia-northeast1-c
asia-northeast2-a asia-northeast2-a
asia-northeast2-b asia-northeast2-b
asia-northeast2-c asia-northeast2-c
asia-south1-a asia-south1-a
asia-south1-b asia-south1-b
asia-south1-c asia-south1-c
asia-southeast1-a asia-southeast1-a
asia-southeast1-b asia-southeast1-b
asia-southeast1-c asia-southeast1-c
australia-southeast1-a australia-southeast1-a
australia-southeast1-b australia-southeast1-b
australia-southeast1-c australia-southeast1-c
europe-north1-a europe-north1-a
europe-north1-b europe-north1-b
europe-north1-c europe-north1-c
europe-west1-b europe-west1-b
europe-west1-c europe-west1-c
europe-west1-d europe-west1-d
europe-west2-a europe-west2-a
europe-west2-b europe-west2-b
europe-west2-c europe-west2-c
europe-west3-a europe-west3-a
europe-west3-b europe-west3-b
europe-west3-c europe-west3-c
europe-west4-a europe-west4-a
europe-west4-b europe-west4-b
europe-west4-c europe-west4-c
europe-west6-a europe-west6-a
europe-west6-b europe-west6-b
europe-west6-c europe-west6-c
northamerica-northeast1-a northamerica-northeast1-a
northamerica-northeast1-b northamerica-northeast1-b
northamerica-northeast1-c northamerica-northeast1-c
southamerica-east1-a southamerica-east1-a
southamerica-east1-b southamerica-east1-b
southamerica-east1-c southamerica-east1-c
us-central1-a us-central1-a
us-central1-b us-central1-b
us-central1-c us-central1-c
us-central1-f us-central1-f
us-east1-b us-east1-b
us-east1-c us-east1-c
us-east1-d us-east1-d
us-east4-a us-east4-a
us-east4-b us-east4-b
us-east4-c us-east4-c
us-west1-a us-west1-a
us-west1-b us-west1-b
us-west1-c us-west1-c
us-west2-a us-west2-a
us-west2-b us-west2-b
us-west2-c us-west2-c

Hetzner

Key Description
1 Falkenstein DC Park 1
2 Nuremberg DC Park 1
3 Helsinki DC Park 1

Linode

Key Description
Atlanta, GA, USA Atlanta, GA, USA
Dallas, TX, USA Dallas, TX, USA
Frankfurt, DE Frankfurt, DE
Fremont, CA, USA Fremont, CA, USA
London, England, UK London, England, UK
Newark, NJ, USA Newark, NJ, USA
Singapore, SG Singapore, SG
Tokyo 2, JP Tokyo 2, JP
Toronto, ON Toronto, ON

OVH

Key Description
WAW1 Warsaw, PL
UK1 London, UK
BHS5 Beauharnois, CA
DE1 Frankfurt, DE
GRA7 Gravelines, FR
SBG5 Strasbourg, DE
US-EAST-VA-1 Virginia, USA

Packet

Key Description
ams1 Amsterdam, NL
atl1 Atlanta, GA
dfw1 Dallas, TX 1
dfw2 Dallas, TX 2
ewr1 Parsippany, NJ
fra2 Frankfurt 2, DE
hkg1 Hong Kong 1, HK
iad1 Ashburn, VA
lax1 Los Angeles, CA
mrs1 Marseille, France
nrt1 Tokyo, JP
ord1 Chicago, IL
sea1 Seattle, WA
sin1 Singapore
sjc1 Sunnyvale, CA
syd1 Sydney, Australia
yyz1 Toronto, ON, CA

Vultr

Key Description
6 Atlanta, GA, US
2 Chicago, IL, US
3 Dallas, TX, US
5 Los Angeles, CA, US
39 Miami, FL, US
1 New Jersey, NJ, US
4 Seattle, WA, US
12 Silicon Valley, CA, US
40 Singapore, SG
7 Amsterdam, NL
25 Tokyo, JP
8 London, GB
24 Paris, FR
9 Frankfurt, DE
22 Toronto, CA
19 Sydney, AU

Rackspace

Key Description
chicago Chicago
dallas Dallas
hong_kong Hong Kong
london London
northern_virginia Northern Virginia
sydney Sydney

Stacks

Methods

Using the Stacks endpoint, you can submit requests using the following methods.

  • List all stacks
  • View a stack
  • Create a new stack (Docker only)
  • List all stack actions
  • View a stack action
  • Perform a stack action
  • Add an SSL certificate to a stack

Stack List

response = token.get("#{api_url}/stacks.json")

puts JSON.parse(response.body)['response']
GET /stacks HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
    "response": [
        {
            "uid": "5999b763474b0eafa5fafb64bff0ba80",
            "name": "Awesome App",
            "git": "http://github.com/cloud66-samples/awesome-app.git",
            "git_branch": "fig",
            "environment": "production",
            "cloud": "DigitalOcean",
            "fqdn": "awesome-app.dev.c66.me",
            "language": "ruby",
            "framework": "rails",
            "status": 1,
            "health": 3,
            "last_activity": "2014-08-14T01:46:53+00:00",
            "last_activity_iso": "2014-08-14T01:46:53+00:00",
            "maintenance_mode": false,
            "has_loadbalancer": false,
            "created_at": "2014-08-14 00:38:14 UTC",
            "updated_at": "2014-08-14 01:46:52 UTC",
            "deploy_directory": "/var/deploy/awesome_app",
            "cloud_status": "partial",
            "created_at_iso": "2014-08-14T00:38:14Z",
            "updated_at_iso": "2014-08-14T01:46:52Z",
            "redeploy_hook": "http://hooks.cloud66.com/stacks/redeploy/b806f1c3344eb3aa2a024b23254b75b3/6d677352a6b2eefec6e345ee2b491521"
        }
    ],
    "count": 1,
    "pagination": {
        "previous": null,
        "next": null,
        "current": 1,
        "per_page": 30,
        "count": 1,
        "pages": 1
    }
}

Retrieves a paged list of all the stack objects the user can access.

HTTP Request

GET /stacks

The stack object

Property Data type Description Sample value
uid string The unique identifier of the stack. 5999b763474b0eafa5fafb64bff0ba80
name string The name defined for the stack. My Awesome App
git string The git repository URL associated with the stack. http://github.com/mysamples/awesome-app.git
git_branch string The git repository branch associated with the stack. fig
environment string The environment associated with the stack. production
cloud string The cloud provider associated with the stack. DigitalOcean
fqdn string The fully qualified namespace of the stack. awesome-app.dev.c66.me
language string The programming language of the stack. ruby
framework string The framework used for the stack. rails
status int The current status code for the stack. 1
health int The current health code for the stack. 3
last_activity datetime The date and time the last action was performed for the stack, in UTC datetime. 2014-08-14T01:46:53+00:00
last_activity_iso datetime The date and time the last action was performed for the stack, in UTC datetime 2014-08-14T01:46:53+00:00
maintenance mode bool Whether the stack currently has maintenance mode enabled. false
has_loadbalancer bool Whether the stack has an associated load balancer add-in. false
created_at datetime The date and time the stack was created, in iso8601 format 2014-09-01T19:08:05Z
updated_at datetime The date and time the stack was last modified, in iso8601 format 2014-09-01T19:18:05Z
deploy_directory string The target directory for stack deployment. /var/deploy/awesome_app
cloud_status string The current cloud provider status associated with the stack. partial
redeploy_hook string If applicable, the deploy hook URL associated with the stack. http://hooks.cloud66.com/stacks/redeploy/ b806f1c3344eb3aa2a024b23254b75b3/6d677352a6b2eefec6e345ee2b491521

Stack

id = 'a6b583684833a2cf4845079c9d9350a8'
response = token.get("#{api_url}/stacks/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
"response":
  {
    "uid": "5999b763474b0eafa5fafb64bff0ba80",
      "name": "Awesome App",
      "git": "http://github.com/cloud66-samples/awesome-app.git",
      "git_branch": "fig",
      "environment": "production",
      "cloud": "DigitalOcean",
      "fqdn": "awesome-app.dev.c66.me",
      "language": "ruby",
      "framework": "rails",
      "status": 1,
      "health": 3,
      "last_activity": "2014-08-14T01:46:53+00:00",
      "last_activity_iso": "2014-08-14T01:46:53+00:00",
      "maintenance_mode": false,
      "has_loadbalancer": false,
      "created_at": "2014-08-14 00:38:14 UTC",
      "updated_at": "2014-08-14 01:46:52 UTC",
      "deploy_directory": "/var/deploy/awesome_app",
      "cloud_status": "partial",
      "created_at_iso": "2014-08-14T00:38:14Z",
      "updated_at_iso": "2014-08-14T01:46:52Z",
      "redeploy_hook": "http://hooks.cloud66.com/stacks/redeploy/b806f1c3344eb3aa2a024b23254b75b3/6d677352a6b2eefec6e345ee2b491521"
  }
}

Retrieve the details of the stack specified in the request.

HTTP Request

GET /stacks/{id}

Query parameters

Parameter Presence Data type Description Sample value
id required string Unique identifier of the stack 5999b763474b0eafa5fafb64bff0ba80

Stack status values

Status Code Description
STK_QUEUED 0 Pending analysis
STK_SUCCESS 1 Deployed successfully
STK_FAILED 2 Deployment failed
STK_ANALYSING 3 Analyzing
STK_ANALYSED 4 Analyzed
STK_QUEUED_FOR_DEPLOYING 5 Queued for deployment
STK_DEPLOYING 6 Deploying
STK_TERMINAL_FAILURE 7 Unable to analyze

Stack health status values

Status Code Description
HLT_UNKNOWN 0 Unknown
HLT_BUILDING 1 Building
HLT_PARTIAL 2 Impaired
HLT_OK 3 Healthy
HLT_BROKEN 4 Failed

Stack Create

service_file = File.read('path/to/service.yml')
manifest_file = File.read('path/to/manifest.yml')

#Using manifest.yml
response = token.post("#{api_url}/stacks.json", {body: {:name => 'new_stack_name', :environment => 'production', :service_yaml => service_file, :manifest_yaml => manifest_file}})

#Using separate parameters
response = token.post("#{api_url}/stacks.json", {body: {:name => 'new_stack_name', :environment => 'production', :service_yaml => service_file, :cloud => 'digitalocean', :region => 'ams1', :size => '1gb', :build_type => 'single'}})

puts JSON.parse(response.body)['response']
POST /stacks HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{ "response":
    {
        "id":10,
        "user":"test@cloud66.com",
        "resource_type":"stack",
        "action":"stack_create",
        "resource_id":"283",
        "started_via":"api",
        "started_at":"2015-09-01T19:08:05Z",
        "finished_at":null,
        "finished_success":null,
        "finished_message":null
    }
}

Create and build a new docker stack. Either manifest definition, or cloud, region, size and build_type must be passed as params.

HTTP Request

POST /stacks

Query parameters

Parameter Presence Data type Description Sample value
name required string New stack name new_stack_name
environment required string New stack environment production
service_yaml required string The services definition of the new docker stack service_yaml_serialised
manifest_yaml optional string The manifest definition of the new docker stack manifest_yaml_serialised
cloud optional string Cloud provider to create servers in aws
key_name optional string Name of the cloud provider key (Default or first available key for the cloud if not specified) my_key
region optional string Region within the cloud to create servers in us-east-1
size optional string Size of the server t1.micro
build_type optional string Deploy all services to single or multi servers multi

Stack Action list

id = 'a6b583684833a2cf4845079c9d9350a8'
response = token.get("#{api_url}/stacks/#{id}/actions.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id}/actions HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
        [
    {
      "id":10,
      "user":"test@cloud66.com",
      "resource_type":"stack",
      "action":"clear_caches",
      "resource_id":"283",
      "started_via":"api",
      "started_at":
      "2014-09-01T19:08:05Z",
      "finished_at":"2014-09-01T19:08:09Z",
      "finished_success":true,
      "finished_message":null
    }
  ],
  "count":1,
  "pagination":
    {
      "previous":null,
      "next":null,
      "current":1,
      "per_page":30,
      "count":1,
      "pages":1
    }
}

Retrieve a paged list of all asynchronous actions performed for the stack specified in the request.

HTTP Request

GET /stacks/{id}/actions

Query parameters

Parameter Presence Data type Description Sample value
id required string Unique identifier of the stack 5999b763474b0eafa5fafb64bff0ba80

The stack action object

Property Data type Description Sample value
id int The numeric identifier of the stack action. Identifiers increment by one for each performed action. 10
user string The email address of the user who performed the stack action. hello@cloud66.com
resource_type string The resource for which the action was performed, which is stack in this case. stack
action string The action that was performed for the stack. restart
resource_id int The unique ID of the resource 283
started_via string The process that initiated the action, which is the UI, API, or command line. api
started_at datetime The date and time the action was initiated, in UTC datetime. 2014-09-01T19:08:05Z
finished_at datetime The date and time the action was completed, in UTC datetime. 2014-09-01T19:08:09Z
finished_success bool Whether the action completed successfully. true
finished_message string If applicable, the system message associated with the completed action. null

Stack Action

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
id = '202161'
response = token.get("#{api_url}/stacks/#{stack_id}/actions/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/actions/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":10,
      "user":"test@cloud66.com",
      "resource_type":"stack",
      "action":"clear_caches",
      "resource_id":"283",
      "started_via":"api",
      "started_at":
      "2014-09-01T19:08:05Z",
      "finished_at":"2014-09-01T19:08:09Z",
      "finished_success":true,
      "finished_message":null
    }
}

Retrieve the details of an asynchronous action performed for the the stack specified in the request based on the supplied action ID.

HTTP Request

GET /stacks/{stack_id}/actions/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string Unique identifier of the stack 5999b763474b0eafa5fafb64bff0ba80
id required integer Identifier of the asynchronous action 4153

Run Stack action

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
response = token.post("#{api_url}/stacks/#{stack_id}/actions.json", {body: {:command => 'clear_caches'}})

puts JSON.parse(response.body)['response']
POST /stacks/{stack_id}/actions HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":10,
      "user":"test@cloud66.com",
      "resource_type":"stack",
      "action":"clear_caches",
      "resource_id":"283",
      "started_via":"api",
      "started_at":"2014-09-01T19:08:05Z",
      "finished_at":null,
      "finished_success":null,
      "finished_message":null
    }
}

Perform an asynchronous action for the stack specified in the request. You can use this method to restart the stack, clear the stack's cache, or enable maintenance mode.

HTTP Request

POST /stacks/{stack_id}/actions

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string Unique identifier of the stack 5999b763474b0eafa5fafb64bff0ba80
command required string The action to perform for the stack. Valid values are clear_caches, maintenance_mode, and restart. restart
Command Comments Extra Parameters
maintenance_mode Enable to Disable maintenance mode for a stack.
  • value:1 for enable or 0 for disable
clear_caches Clear git caches for the stack None
restart Restarts all stack components (nginx, db, etc.) None
promote_slave_db Promote the specified slave database server to a standalone master
  • server:server-name
  • server_group: valid values all, mysql, postgresql, redis, mongodb
resync_slave_db Re-sync the specified slave database server with its master database server
  • server:server-name
  • server_group: valid values all, mysql, postgresql, redis, mongodb
container_restart Restarts a particular container on the given stack
  • container:5999b763474b0eafa5fafb64bff0ba80
service_restart Restarts all the containers from the given service
  • service_name:web
  • server_id_filter:f8468fc145ea49bac474b30a8fea888d (optional)

Reboot the Stack

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
response = token.post("#{api_url}/stacks/#{stack_id}/reboot_servers.json")

puts JSON.parse(response.body)['response']
POST /stacks/{stack_id}/reboot_servers HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":10,
      "user":"test@cloud66.com",
      "resource_type":"stack",
      "action":"stack_reboot",
      "resource_id":"283",
      "started_via":"api",
      "started_at":"2016-01-01T19:08:05Z",
      "finished_at":null,
      "finished_success":null,
      "finished_message":null
    }
}

You can use this method to reboot the stack or speific server group of a stack.

HTTP Request

POST /stacks/{stack_id}/reboot_servers

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string Unique identifier of the stack 5999b763474b0eafa5fafb64bff0ba80
strategy required string parallel or serial parallel
group optional string all or web/db/redis etc (default is web) mysql

SSL certificate

stack_id = 'JReEhI8LboQjFcI4hMmbgLqvPbMkgT7T'
response = token.post("#{api_url}/stacks/#{stack_id}/ssl_certificates.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/ssl_certificates HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": [
    {
      "uuid": "ssl-5NW0p4CvaYMIjmySGPsCBWLlXIkiIgxw",
      "name": "my-serv-new",
      "server_group_id": null,
      "server_names": "master.my-serv-new.c66.me",
      "sha256_fingerprint": "UXXsUuBNZQhNBBsPjaEATCA8t06O2RvgxuMC16q1XLCCHkIitBvMcDqoUpNO16oK",
      "ca_name": "Let's Encrypt",
      "type": "lets_encrypt",
      "ssl_termination": true,
      "has_intermediate_cert": true,
      "status": 3,
      "created_at": "2019-10-23T14:15:53Z",
      "updated_at": "2020-03-04T12:48:25Z",
      "expires_at": "2020-06-02T11:48:04Z",
      "certificate": null,
      "key": null,
      "intermediate_certificate": null
    }
  ],
  "count": 1,
  "pagination": {
    "previous": null,
    "next": null,
    "current": 1,
    "per_page": 30,
    "count": 1,
    "pages": 1
  }
}

You can use this method to query, add, delete or update SSL certificates on a stack.

HTTP Request

GET /stacks/:stack_id/ssl_certificates

POST /stacks/:stack_id/ssl_certificates

GET /stacks/:stack_id/ssl_certificates/:id

PATCH /stacks/:stack_id/ssl_certificates/:id

PUT /stacks/:stack_id/ssl_certificates/:id

DELETE /stacks/:stack_id/ssl_certificates/:id

Query parameters

Parameter Presence Data type Description Sample value
type required string Type of certificate (manual or Let's Encrypt) lets_encrypt
ssl_termination required bool Whether SSL certificate is terminated on the load balancer or not true
server_names required string comma separated list of domains hello.com,world.co.uk
certificate required for manual certs string The certificate address -----BEGIN CERTIFICATE-----
entire cert hash
-----END CERTIFICATE-----
key required for manual certs string The certificate key -----BEGIN RSA PRIVATE KEY-----
entire key hash
-----END RSA PRIVATE KEY-----
intermediate_certificate optional string The intermediate certificate chain -----BEGIN CERTIFICATE-----
entire cert hash
-----END CERTIFICATE-----

Processes

Processes list

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
response = token.get("#{api_url}/stacks/#{stack_id}/processes.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id}/processes HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":[
    {
      "md5":"5999b763474b0eafa5fafb64bff0ba80",
      "name":"worker",
      "command":"bundle exec rake jobs:work",
      "servers":{"server_name":1}
    },
    {
      "md5":"1230fd91f8c9e4e56c1b14dd0391702",
      "name":"scheduler",
      "command":"bundle exec rake jobs:schedule",
      "servers":{"server_name":1}
    }
  ],
  "count":2,
  "pagination":
    {
      "previous":null,
      "next":null,
      "current":1,
      "per_page":30,
      "count":2,
      "pages":1
    }
}

Get list of all processes of stack.

HTTP Request

GET /stacks/{id}/processes

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string stack UID 5999b763474b0eafa5fafb64bff0ba80
server_uid optional integer server UID e63e859d5ab72b0bcf14321f0ffb013d

Process Single one

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
id = 4153
response = token.get("#{api_url}/stacks/#{stack_id}/processes.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/processes/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":[
    {
      "md5":"5999b763474b0eafa5fafb64bff0ba80",
      "name":"worker",
      "command":"bundle exec rake jobs:work",
      "servers":{"server_name1":1}
    },
    {
      "md5":"1230fd91f8c9e4e56c1b14dd0391702",
      "name":"scheduler",
      "command":"bundle exec rake jobs:schedule",
      "servers":{"server_name1":3}
    }
  ],
  "count":2,
  "pagination":
    {
      "previous":null,
      "next":null,
      "current":1,
      "per_page":30,
      "count":2,
      "pages":1
    }
}

Get information about a single process.

HTTP Request

GET /stacks/{stack_id}/processes/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required string Process Name worker
server_uid optional integer Server ID e63e859d5ab72b0bcf14321f0ffb013d

Scale a Process

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
response = token.post("#{api_url}/stacks/#{stack_id}/processes.json")

puts JSON.parse(response.body)['response']
POST /stacks/{stack_id}/processes HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Accept: application/json
Content-Type: application/json

{
  "response": [
    {
      "id":10,
      "user":"test@cloud66.com",
      "resource_type":"stack",
      "action":"Process_scale",
      "resource_id":"283",
      "started_via":"api",
      "started_at":"2016-01-01T19:08:05Z",
      "finished_at":null,
      "finished_success":null,
      "finished_message":null
    }
  ]
}

Scale up a process.

HTTP Request

POST /stacks/{stack_id}/processes

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
process_name required string process name scheduler
server_count required string hash of {server_uid:count} e63e859d5ab72b0bcf14321f0ffb013d:4

Deployments

Deployment list

id = 'a6b583684833a2cf4845079c9d9350a8'
response = token.get("#{api_url}/stacks/#{id}/deployments.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id}/deployments HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":[
    {
      "id":107,
      "triggered_by":"test@cloud66.com",
      "triggered_via":
        {
          "code":0,
          "meaning":"web"
        },
      "started_at":"2014-08-29T17:46:16Z",
      "finished_at":"2014-08-29T17:58:23Z",
      "outcome":
        {
          "code":1,
          "meaning":"success"
        },
      "git_hash":"5675fcd8f9e6dc534ecf1410c0661c066097e310",
      "deploy_session":"OhBHNzkXSl",
      "deploy_type":
        {
          "code":0,
          "meaning":"build"
        },
      "is_head":true,
      "is_live":true,
      "reverted":null,
      "reverted_by":null,
      "reverted_at":null,
      "is_deploying":false,
      "commit_url":"https://github.com/cloud66-samples/rails-test/commit/5675fcd8f9e6dc534ecf1410c0661c066097e310"
    }
  ],
  "count":1,
  "pagination":
    {
      "previous":null,
      "next":null,
      "current":1,
      "per_page":30,
      "count":1,
      "pages":1
    }
}

Get list of all deployments of a stack

HTTP Request

GET /stacks/{id}/deployments

Query parameters

Parameter Presence Data type Description Sample value
id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80

Deployment

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
id = '3608'
response = token.get("#{api_url}/stacks/#{stack_id}/deployments/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/deployments/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":107,
      "triggered_by":"test@cloud66.com",
      "triggered_via":
        {
          "code":0,
          "meaning":"web"
        },
      "started_at":"2014-08-29T17:46:16Z",
      "finished_at":"2014-08-29T17:58:23Z",
      "outcome":
        {
          "code":1,
          "meaning":"success"
        },
      "git_hash":"5675fcd8f9e6dc534ecf1410c0661c066097e310",
      "deploy_session":"OhBHNzkXSl",
      "deploy_type":
        {
          "code":0,
          "meaning":"build"
        },
      "is_head":true,
      "is_live":true,
      "reverted":null,
      "reverted_by":null,
      "reverted_at":null,
      "is_deploying":false,
      "commit_url":"https://github.com/cloud66-samples/rails-test/commit/5675fcd8f9e6dc534ecf1410c0661c066097e310"
    }
}

Get information of a single deployment

HTTP Request

GET /stacks/{stack_id}/deployments/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required integer The deployment ID 107

Redeploy

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
response = token.post("#{api_url}/stacks/#{stack_id}/deployments.json")

puts JSON.parse(response.body)['response']
POST /stacks/{stack_id}/deployments HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "ok":true,
      "message":"Stack queued for redeployment"
    }
}

Redeploy a stack

HTTP Request

POST /stacks/{stack_id}/deployments

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
git_ref optional string Git reference (branch, tag or hash). Non-docker only. a_git_tag_or_hash
services optional string Deploy only the service(s) specified. Docker only. service1,service2

Cancel deployment

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
id = '3649'
response = token.delete("#{api_url}/stacks/#{stack_id}/deployments/#{id}.json")

puts JSON.parse(response.body)['response']
DELETE /stacks/{stack_id}/deployments/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "ok":true,
      "message":"Cancelling deployment"
    }
}

Cancel a live stack deployment

HTTP Request

DELETE /stacks/{stack_id}/deployments/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required integer The deployment ID 112

Services

Services list

id = 'a6b583684833a2cf4845079c9d9350a8'
response = token.get("#{api_url}/stacks/#{id}/services.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id}/services HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": [
    {
      "name": "web",
      "containers": [
        {
          "uid": "1339d2dfa5a86dfce497f8f2e1bb29492f246288c722d11c8e6fc9348bfeece6",
          "server_uid": "edfbd7a9b97e999ebf17984282d4b457",
          "server_name": "Cormorant",
          "service_name": "web",
          "image": "quay.io/cloud66/sample-rails",
          "port_list": "[\"5128:3000\"]",
          "command": "rackup -p 3000",
          "started_at": "2014-09-30T09:59:45Z",
          "web_ports": "80:443",
          "created_at": "2014-09-30T09:59:45Z",
          "updated_at": "2014-09-30T09:59:48Z"
        }
      ]
    }
  ],
  "count": 1,
  "pagination": {
    "previous": null,
    "next": null,
    "current": 1,
    "per_page": 30,
    "count": 1,
    "pages": 1
  }
}

Get a list of all services of the stack

HTTP Request

GET /stacks/{id}/services

Query parameters

Parameter Presence Data type Description Sample value
id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
server_uid optional string Server UID 1239b763474b0eafa5fafb64bff0ba80

Service show

stack_id = 'ec28beaa0e324c21ab2f9c5a153189a2'
id = 'web'
response = token.get("#{api_url}/stacks/#{stack_id}/services/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/services/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": {
    "name": "web",
    "containers": [
      {
        "uid": "1339d233a5a86dfce497f8f2e1bb29492f246288c722d11c8e6fc9348bfeece6",
        "server_uid": "1239b763474b0eafa5fafb64bff0ba80",
        "server_name": "Cormorant",
        "service_name": "web",
        "image": "quay.io/cloud66/sample-rails",
        "port_list": "[\"5128:3000\"]",
        "command": "rackup -p 3000",
        "started_at": "2014-09-30T09:59:45Z",
        "web_ports": "80:443",
        "created_at": "2014-09-30T09:59:45Z",
        "updated_at": "2014-09-30T09:59:48Z"
      }
    ]
  }
}

Get information of a service of the stack

HTTP Request

GET /stacks/{stack_id}/services/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required string The service name web
server_uid optional string Server UID 1239b763474b0eafa5fafb64bff0ba80

Service scale

stack_id = 'ec28beaa0e324c21ab2f9c5a153189a2'
id = 'web'
response = token.post("#{api_url}/stacks/#{stack_id}/services.json", {body: {:service_name => id}})

puts JSON.parse(response.body)['response']
POST /stacks/{stack_id}/services HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": {
    "id": 1234,
    "user": "theuser@yourdomain.com",
    "resource_type": "stack",
    "action": "service_scale",
    "resource_id": "15633",
    "started_via": "api",
    "started_at": "2014-09-30T11:36:58Z",
    "finished_at": null,
    "finished_success": null,
    "finished_message": null
  }
}

Scale the given service over the stack

HTTP Request

POST /stacks/{stack_id}/services

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
service_name required string The service name web
server_count optional string A hash of server uid to count of containers desired on that server {"123123cfcb7d3d2b54614b19e2a6c673":2}
server_group_count optional string A hash of server_group to count of containers across the servers of that group {"web":4}

Service stop

stack_id = 'ec28beaa0e324c21ab2f9c5a153189a2'
id = 'web'
response = token.delete("#{api_url}/stacks/#{stack_id}/services/#{id}.json")

puts JSON.parse(response.body)['response']
DELETE /stacks/{stack_id}/services/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": {
    "id": 1234,
    "user": "theuser@yourdomain.com",
    "resource_type": "stack",
    "action": "service_stop",
    "resource_id": "15633",
    "started_via": "api",
    "started_at": "2014-09-30T11:36:58Z",
    "finished_at": null,
    "finished_success": null,
    "finished_message": null
  }
}

Stop all of the given service on the stack (across all servers, unless server_uid is supplied)

HTTP Request

DELETE /stacks/{stack_id}/services/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required string The service name web
server_uid optional string Server UID 1239b763474b0eafa5fafb64bff0ba80

Containers

Containers list

id = 'a6b583684833a2cf4845079c9d9350a8'
response = token.get("#{api_url}/stacks/#{id}/containers.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id}/containers HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
   "response":[
      {
         "uid":"cba44fa6b6acf57fb0ef6c2ce385f6a129867df544dae7181d2410e9f9cc32bc",
         "server_uid":"c6014897b8c8e9f2fc204a3a9efdae05",
         "server_name":"Gazelle",
         "service_name":"web",
         "image":"quay.io/cloud66/sample-rails",
         "command":"bundle exec rackup -p 3000",
         "started_at":"2015-02-10T17:41:31Z",
         "ports":[
            {
               "container":3000,
               "http":80,
               "https":443
            }
         ],
         "private_ip":"25.0.0.2",
         "docker_ip":null,
         "health_state":1,
         "health_message":null,
         "health_source":"system",
         "capture_output":true,
         "restart_on_deploy":true,
         "created_at":"2015-02-10T17:41:37Z",
         "updated_at":"2015-02-17T14:40:17Z"
      }
   ],
   "count":1,
   "pagination":{
      "previous":null,
      "next":null,
      "current":1,
      "per_page":30,
      "count":1,
      "pages":1
   }
}

Get a list of all the containers of the stack

HTTP Request

GET /stacks/{id}/containers

Query parameters

Parameter Presence Data type Description Sample value
id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
server_uid optional string Server UID c6014897b8c8e9f2fc204a3a9efdae05

Container show

stack_id = 'ec28beaa0e324c21ab2f9c5a153189a2'
id = 'cba44fa6b6acf57fb0ef6c2ce385f6a129867df544dae7181d2410e9f9cc32bc'
response = token.get("#{api_url}/stacks/#{stack_id}/containers/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/containers/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
   "response":{
      "uid":"cba44fa6b6acf57fb0ef6c2ce385f6a129867df544dae7181d2410e9f9cc32bc",
      "server_uid":"c6014897b8c8e9f2fc204a3a9efdae05",
      "server_name":"Gazelle",
      "service_name":"web",
      "image":"quay.io/cloud66/sample-rails",
      "command":"bundle exec rackup -p 3000",
      "started_at":"2015-02-10T17:41:31Z",
      "ports":[
         {
            "container":3000,
            "http":80,
            "https":443
         }
      ],
      "private_ip":"25.0.0.2",
      "docker_ip":"172.0.2.12",
      "health_state":1,
      "health_message":null,
      "health_source":"system",
      "capture_output":true,
      "restart_on_deploy":true,
      "created_at":"2015-02-10T17:41:37Z",
      "updated_at":"2015-02-17T14:40:17Z",
      "runtime":{
         "AppArmorProfile":"",
         "Args":[
            "bundle",
            "exec",
            "rackup",
            "-p",
            "3000"
         ],
         "Config":{
            "AttachStderr":true,
            "AttachStdin":false,
            "AttachStdout":true,
            "Cmd":[
               "bundle",
               "exec",
               "rackup",
               "-p",
               "3000"
            ],
            "CpuShares":0,
            "Cpuset":"",
            "Domainname":"",
            "Entrypoint":[
               "/etc/cloud66/tools/docker_network.sh"
            ],
            "Env":[
               "STACK_GIT_BRANCH=",
               "STACK_PATH=/var/deploy/lv_dev_service_download/web_head/current",
               "STACK_BASE=/var/deploy/lv_dev_service_download/web_head",
               "SECRET_KEY_BASE=f30c0e5da0cb4467e4cae0f315a664d023b1782f791e682dbe2dc100d3b010cd6b3d899c01138470c10892cf31732b7bb83a31b4907296ad985e8f55663629c1",
               "WEB_ADDRESS_INT=10.132.130.135",
               "WEB_ADDRESS_EXT=104.236.242.128",
               "WEB_ADDRESSES_INT=10.132.130.135",
               "WEB_ADDRESSES_EXT=104.236.242.128",
               "MYSQL_USERNAME=uacru9",
               "MYSQL_PASSWORD=FBfgULSTlfjruP3",
               "MYSQL_DATABASE=lv_dev_service_download_production",
               "MYSQL_ADDRESS_INT=10.132.130.135",
               "MYSQL_ADDRESS_EXT=104.236.242.128",
               "MYSQL_URL_INT=mysql://uacru9:FBfgULSTlfjruP3@10.132.130.135:3306/lv_dev_service_download_production",
               "MYSQL_URL_EXT=mysql://uacru9:FBfgULSTlfjruP3@104.236.242.128:3306/lv_dev_service_download_production",
               "MYSQL_SLAVE_ADDRESSES_INT=",
               "MYSQL_SLAVE_ADDRESSES_EXT=",
               "WEB_ADDRESS=10.132.130.135",
               "WEB_ADDRESSES=10.132.130.135",
               "MYSQL_ADDRESS=10.132.130.135",
               "MYSQL_URL=mysql://uacru9:FBfgULSTlfjruP3@10.132.130.135:3306/lv_dev_service_download_production",
               "MYSQL_SLAVE_ADDRESSES=",
               "SERVER_NAME=Gazelle",
               "PRIMARY=true",
               "CONTAINER_NOTIFY_URL=http://vic.local.cldblx.com/stacks/87bc318604208618a01817bf4442befb/servers/c6014897b8c8e9f2fc204a3a9efdae05/services/web/notification/4911055bcf0b5d7a31ebfbdff4043c31",
               "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
               "RUBY_MAJOR=2.1",
               "RUBY_VERSION=2.1.3"
            ],
            "ExposedPorts":{
               "3000/tcp":{

               }
            },
            "Hostname":"cba44fa6b6ac",
            "Image":"quay.io/cloud66/sample-rails",
            "MacAddress":"",
            "Memory":0,
            "MemorySwap":0,
            "NetworkDisabled":false,
            "OnBuild":null,
            "OpenStdin":false,
            "PortSpecs":null,
            "StdinOnce":false,
            "Tty":false,
            "User":"",
            "Volumes":null,
            "WorkingDir":"/usr/src/app"
         },
         "Created":"2015-02-10T17:41:36.988310784Z",
         "Driver":"aufs",
         "ExecDriver":"native-0.2",
         "HostConfig":{
            "Binds":[
               "/etc/cloud66/tools:/etc/cloud66/tools",
               "/var/log/containers:/usr/src/app/log",
               "/tmp:/tmp_host:rw"
            ],
            "CapAdd":null,
            "CapDrop":null,
            "ContainerIDFile":"",
            "Devices":[

            ],
            "Dns":[
               "172.17.42.1"
            ],
            "DnsSearch":null,
            "ExtraHosts":null,
            "IpcMode":"",
            "Links":null,
            "LxcConf":[

            ],
            "NetworkMode":"bridge",
            "PortBindings":{

            },
            "Privileged":false,
            "PublishAllPorts":false,
            "RestartPolicy":{
               "MaximumRetryCount":0,
               "Name":""
            },
            "SecurityOpt":null,
            "VolumesFrom":null
         },
         "HostnamePath":"/var/lib/docker/containers/cba44fa6b6acf57fb0ef6c2ce385f6a129867df544dae7181d2410e9f9cc32bc/hostname",
         "HostsPath":"/var/lib/docker/containers/cba44fa6b6acf57fb0ef6c2ce385f6a129867df544dae7181d2410e9f9cc32bc/hosts",
         "Id":"cba44fa6b6acf57fb0ef6c2ce385f6a129867df544dae7181d2410e9f9cc32bc",
         "Image":"f3443abc9c9e1595d1e039bf0c060f259d318e57910a80efee2e34895b10e749",
         "MountLabel":"",
         "Name":"/stoic_nobel",
         "NetworkSettings":{
            "Bridge":"docker0",
            "Gateway":"172.17.42.1",
            "IPAddress":"172.17.0.4",
            "IPPrefixLen":16,
            "MacAddress":"02:42:ac:11:00:04",
            "PortMapping":null,
            "Ports":{
               "3000/tcp":null
            }
         },
         "Path":"/etc/cloud66/tools/docker_network.sh",
         "ProcessLabel":"",
         "ResolvConfPath":"/var/lib/docker/containers/cba44fa6b6acf57fb0ef6c2ce385f6a129867df544dae7181d2410e9f9cc32bc/resolv.conf",
         "State":{
            "Error":"",
            "ExitCode":0,
            "FinishedAt":"0001-01-01T00:00:00Z",
            "OOMKilled":false,
            "Paused":false,
            "Pid":25739,
            "Restarting":false,
            "Running":true,
            "StartedAt":"2015-02-10T17:41:37.915288589Z"
         },
         "Volumes":{
            "/etc/cloud66/tools":"/etc/cloud66/tools",
            "/tmp_host":"/tmp",
            "/usr/src/app/log":"/var/log/containers"
         },
         "VolumesRW":{
            "/etc/cloud66/tools":true,
            "/tmp_host":true,
            "/usr/src/app/log":true
         }
      }
   }
}

Get information of a container of the stack (includes container runtime information)

HTTP Request

GET /stacks/{stack_id}/containers/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required string The container UID cba44fa6b6acf57fb0ef6c2ce385f6a129867df544dae7181d2410e9f9cc32bc

Container stop

stack_id = 'ec28beaa0e324c21ab2f9c5a153189a2'
id = 'cba44fa6b6acf57fb0ef6c2ce385f6a129867df544dae7181d2410e9f9cc32bc'
response = token.delete("#{api_url}/stacks/#{stack_id}/containers/#{id}.json")

puts JSON.parse(response.body)['response']
DELETE /stacks/{stack_id}/containers/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": {
    "id": 1234,
    "user": "theuser@yourdomain.com",
    "resource_type": "stack",
    "action": "container_stop",
    "resource_id": "15633",
    "started_via": "api",
    "started_at": "2014-09-30T11:36:58Z",
    "finished_at": null,
    "finished_success": null,
    "finished_message": null
  }
}

Stop the given container

HTTP Request

DELETE /stacks/{stack_id}/containers/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required string The container UID cba44fa6b6acf57fb0ef6c2ce385f6a129867df544dae7181d2410e9f9cc32bc

Docker Image Repositories

Docker Image Repository list

response = token.get("#{api_url}/image_repositories.json")

puts JSON.parse(response.body)['response']
GET /image_repositories HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": [
    {
      "id": 2,
      "url": "https://quay.io",
      "username": "cloud66",
      "email": "kickass@company.com",
      "created_at_iso": "2015-12-03T14:29:51Z",
      "updated_at_iso": "2015-12-03T14:29:51Z"
    },
    {
      "id": 3,
      "url": "https://index.dockerub.com",
      "username": "cloud66",
      "email": "eng@company.com",
      "created_at_iso": "2015-12-03T14:30:17Z",
      "updated_at_iso": "2015-12-03T14:30:17Z"
    }
  ],
  "count": 2,
  "pagination": {
    "previous": null,
    "next": null,
    "current": 1,
    "per_page": 30,
    "count": 2,
    "pages": 1
  }
}

Get list of all Docker image repositories for an account

HTTP Request

GET /image_repositories

Docker Image Repository

id = 3
response = token.get("#{api_url}/image_repositories/#{id}.json")

puts JSON.parse(response.body)['response']
GET /image_repositories/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": {
    "id": 3,
    "url": "https://index.dockerub.com",
    "username": "cloud66",
    "email": "eng@company.com",
    "created_at_iso": "2015-12-03T14:30:17Z",
    "updated_at_iso": "2015-12-03T14:30:17Z"
  }
}

Get information of a single Docker image repository

HTTP Request

GET /image_repositories/{id}

Query parameters

Parameter Presence Data type Description Sample value
id required integer The Docker image repository ID 3

Add Docker Image Repository

response = token.post("#{api_url}/image_repositories.json", {body: {:url => 'https://quay.io', :email => 'kickass@company.com', :username => 'Kickass', :password => 'supersecret'}})

puts JSON.parse(response.body)['response']
POST /image_repositories HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": {
    "id": 283,
    "url": "https://quay.io",
    "username": "Kickass",
    "email": "kickass@company.com",
    "created_at_iso": "2015-12-03T14:30:17Z",
    "updated_at_iso": "2015-12-03T14:30:17Z"
  }
}

HTTP Request

POST /image_repositories

Query parameters

Parameter Presence Data type Description Sample value
url required string Repository URL https://quay.io
email required string User email address kickass@company.com
username required string Username Kickass
password required string Password supersecret

Edit Docker Image Repository

id = 283
response = token.put("#{api_url}/image_repositories/#{id}.json", {body: {:url => 'https://quay.io', :email => 'kickass_squared@company.com', :username => 'KickassSquared', :password => 'supersecret'}})

puts JSON.parse(response.body)['response']
PUT /image_repositories/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": {
    "id": 283,
    "url": "https://quay.io",
    "username": "KickassSquared",
    "email": "kickass_squared@company.com",
    "created_at_iso": "2015-12-03T14:30:17Z",
    "updated_at_iso": "2015-12-03T14:30:17Z"
  }
}

HTTP Request

PUT /image_repositories/{id}

Query parameters

Parameter Presence Data type Description Sample value
id required integer The Docker image repository ID 283
url required string Repository URL https://quay.io
email required string User email address kickass_squared@company.com
username required string Username KickassSquared
password required string Password supersecret

Delete Docker Image Repository

id = 283
response = token.delete("#{api_url}/image_repositories/#{id}.json")

puts JSON.parse(response.body)['response']
DELETE /image_repositories/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": {
    "ok": true
  }
}

HTTP Request

DELETE /image_repositories/{id}

Query parameters

Parameter Presence Data type Description Sample value
id required integer The Docker image repository ID 283

Environment Variables

Environment Variable list

id = '5999b763474b0eafa5fafb64bff0ba80'
response = token.get("#{api_url}/#{id}/environments.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id}/environments HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": [
    {
      "id": 4152,
      "key": "STACK_GIT_BRANCH",
      "value": "master",
      "readonly": true,
      "created_at": "2014-08-29T17:21:25Z",
      "updated_at": "2014-08-29T17:21:25Z",
      "is_password":false,
      "is_generated": true,
              "history" : [{ "key" : 1, "value" : "develop", "created_at" : "2015-05-08T15:09:50Z", "updated_at" : "2015-05-08T15:09:50Z" }]
    },
    {
      "id": 4153,
      "key": "STACK_PATH",
      "value": "/var/deploy/test-elastic-1/web_head/current",
      "readonly": true,
      "created_at": "2014-08-29T17:21:25Z",
      "updated_at": "2014-08-29T17:21:25Z",
      "is_password": false,
      "is_generated": true,
              "history" : [{ "key" : 2, "value" : "/var/deploy/test-elastic-1/web_head/somethingold", "created_at" : "2015-05-08T14:01:50Z", "updated_at" : "2015-05-08T14:01:50Z" }]                    
    },
    {
      "id": 4167,
      "key": "POSTGRESQL_USERNAME",
      "value": "tja",
      "readonly": false,
      "created_at": "2014-08-29T17:21:26Z",
      "updated_at":"2014-08-29T17:21:26Z",
      "is_password":false,
      "is_generated":true,
              "history" : [{ "key" : 5, "value" : "xyz", "created_at" : "2015-05-08T14:01:50Z", "updated_at" : "2015-05-08T14:01:50Z" }, { "key" : 6, "value" : "123", "created_at" : "2015-05-08T14:02:50Z", "updated_at" : "2015-05-08T14:02:50Z" }]
    },
    {
      "id":4168,
      "key": "POSTGRESQL_PASSWORD",
      "value": "tjena",
      "readonly":false,
      "created_at":"2014-08-29T17:21:26Z",
      "updated_at":"2014-08-29T17:21:26Z",
      "is_password":true,
      "is_generated":true,
              "history" : []
    }
  ],
  "count":30,
  "pagination":
    {
      "previous":null,
      "next":null,
      "current":1,
      "per_page":30,
      "count":4,
      "pages":1
    }
}

Get list of all environment variables of stack

HTTP Request

GET /stacks/{id}/environments

Parameter Presence Data type Description Sample value
id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80

Environment Variable

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
id = 4153
response = token.get("#{api_url}/stacks/#{stack_id}/environments/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/environments/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id": 4153,
      "key":
      "STACK_PATH",
      "value":"/var/deploy/test-elastic-1/web_head/current",
      "readonly":true,
      "created_at":"2014-08-29T17:21:25Z",
      "updated_at":"2014-08-29T17:21:25Z",
      "is_password":false,
      "is_generated":true,
                "history" : [{ "key" : 5, "value" : "xyz", "created_at" : "2015-05-08T14:01:50Z", "updated_at" : "2015-05-08T14:01:50Z" }, { "key" : 6, "value" : "123", "created_at" : "2015-05-08T14:02:50Z", "updated_at" : "2015-05-08T14:02:50Z" }]
    }
}

Get information of a single environment variable

HTTP Request

GET /stacks/{stack_id}/environments/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required integer The environment variable ID 4153

Add Environment Variable

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
response = token.post("#{api_url}/stacks/#{stack_id}/environments.json", {body: {:key => 'MY_ENVIRONMENT_VALUE', :value => 'SOME_VALUE'}})

puts JSON.parse(response.body)['response']
POST /stacks/{stack_id}/environments HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":5,
      "user":"test@cloud66.com",
      "resource_type": "stack",
      "action": "env-var-new",
      "resource_id": "280",
      "started_via":"api",
      "started_at": "2014-09-01T10:56:57Z",
      "finished_at": null,
      "finished_success":null,
      "finished_message":null
    }
}

Add a new environment variable

HTTP Request

POST /stacks/{stack_id}/environments

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
key required string The new environment variable key MY_ENVIRONMENT_VALUE
value required string The new environment variable new value SOME_VALUE

Update Environment Variable

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
key = 'POSTGRESQL_SLAVE_ADDRESSES'
response = token.put("#{api_url}/stacks/#{stack_id}/environments/#{key}.json", {body: {:value => '127.0.0.1'}})

puts JSON.parse(response.body)['response']
PUT /stacks/{stack_id}/environments/{key} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":3,
      "user": "test@cloud66.com",
      "resource_type": "stack",
      "action": "env-var-update",
      "resource_id":"280",
      "started_via":"api",
      "started_at": "2014-09-01T10:44:52Z",
      "finished_at": null,
      "finished_success":null,
      "finished_message":null
    }
}

Update value of an environment variable if it is not readonly

HTTP Request

PUT /stacks/{stack_id}/environments/{key}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
key required string The environment variable key POSTGRESQL_SLAVE_ADDRESSES
value required string The environment variable new value 127.0.0.1

Delete Environment Variable

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
key = 'MY_ENV_1'
response = token.delete("#{api_url}/stacks/#{stack_id}/environments/#{key}.json)

puts JSON.parse(response.body)['response']
DELETE /stacks/{stack_id}/environments/{key} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

Delete an environment variable if it is not readonly or generated by cloud66

HTTP Request

DELETE /stacks/{stack_id}/environments/{key}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
key required string The environment variable key MY_ENV_1

Firewall rules

Firewall rules list

id = '5999b763474b0eafa5fafb64bff0ba80'
response = token.get("#{api_url}/stacks/#{id}/firewalls.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id}/firewalls HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": [
    {
      "id": 5027,
      "from_ip": "0.0.0.0/0",
      "from_group_id": null,
      "from_server_id": null,
      "to_ip": null,
      "to_group_id": 128,
      "to_server_id": null,
      "protocol": "tcp",
      "port": 80,
      "rule_type": "dynamic",
      "comments":null,
      "created_at": "2014-08-29T17:58:23Z",
      "updated_at": "2014-08-29T17:58:23Z"
    },
    {
      "id":5028,
      "from_ip":"0.0.0.0/0",
      "from_group_id":null,
      "from_server_id":null,
      "to_ip":null,
      "to_group_id":128,
      "to_server_id":null,
      "protocol":"tcp",
      "port":443,"rule_type":
      "dynamic",
      "comments":null,
      "created_at":
      "2014-08-29T17:58:23Z",
      "updated_at":"2014-08-29T17:58:23Z"
    }
  ],
  "count":2,
  "pagination":
    {
      "previous":null,
      "next":null,
      "current":1,
      "per_page":30,
      "count":11,
      "pages":1
    }
}

Get list of all firewall rules of stack

HTTP Request

GET /stacks/{id}/firewalls

Query parameters

Parameter Presence Data type Description Sample value
id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80

Firewall rule

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
id = 4153
response = token.get("#{api_url}/stacks/#{stack_id}/firewalls/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/firewalls/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":5027,
      "from_ip":"0.0.0.0/0",
      "from_group_id":null,
      "from_server_id":null,
      "to_ip":null,
      "to_group_id":128,
      "to_server_id":null,
      "protocol":"tcp",
      "port":80,
      "rule_type":"dynamic",
      "comments":null,
      "created_at":"2014-08-29T17:58:23Z",
      "updated_at":"2014-08-29T17:58:23Z"
    }
}

Get information of a single firewall rule

HTTP Request

GET /stacks/{stack_id}/firewalls/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required integer The firewall rule ID 4153

Add Firewall rule

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
response = token.post("#{api_url}/stacks/#{stack_id}/firewalls.json", {body: {:from_ip => '123.123.123.123', :protocol => 1, :port => 80, :ttl => 20}})

puts JSON.parse(response.body)['response']
POST /stacks/{stack_id}/firewalls HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":1851,
      "user":"test@cloud66.com",
      "resource_type":"stack",
      "action":"open_lease",
      "resource_id":"1268",
      "started_via":"api",
      "started_at":"2015-12-08T18:01:21Z",
      "finished_at":null,
      "finished_success":null,
      "finished_message":null
    }
}

One of the from/to params must be specified. If you specify ttl , from_ip can be set as AUTO, then caller IP will be set as from_ip

HTTP Request

POST /stacks/{stack_id}/firewalls

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
ttl optional integer Time that firewall rule will be expires in 20
from_ip optional string From IP value of rule 123.123.123.123
from_group_id optional integer You can specify a server group ID as From 19
from_server_id optional integer You can specify a server ID as From 193
to_ip optional string To IP value of rule 123.123.123.123
to_group_id optional integer You can specify a server group ID as To 19
to_server_id optional integer You can specify a server ID as To 1
protocol required integer Protocol of firewall rule . 1=TCP , 2=UDP , 3=ICMP 1
port required integer Port of firewall rule 80

Notifications

Notifications list

id = '5999b763474b0eafa5fafb64bff0ba80'
response = token.get("#{api_url}/stacks/#{id}/notifications.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id}/notifications HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":[
    {
      "id":1189,
      "user_id":18,
      "alert_type":"stack.provision.ok",
      "channels":["email"],
      "stack_id":"5acd43412ea412e32897c40d46f91183",
      "params":{},
      "created_at":"2014-05-29T17:29:54Z",
      "updated_at":"2014-05-29T17:29:54Z"
    },
    {
      "id":1190,
      "user_id":18,
      "alert_type":"stack.provision.fail",
      "channels":["email"],
      "stack_id":"5acd43412ea412e32897c40d46f91183",
      "params":{},
      "created_at":"2014-05-29T17:29:54Z",
      "updated_at":"2014-05-29T17:29:54Z"
    },
    {
      "id":1191,
      "user_id":18,
      "alert_type":"stack.redeploy.ok",
      "channels":["email"],
      "stack_id":"5acd43412ea412e32897c40d46f91183",
      "params":{},
      "created_at":"2014-05-29T17:29:54Z",
      "updated_at":"2014-05-29T17:29:54Z"
    }
  ],
  "count":30,
  "pagination":
    {
      "previous":null,
      "next":2,
      "current":1,
      "per_page":30,
      "count":48,
      "pages":2
    }
}

Get list of all environment variables of stack

HTTP Request

GET /stacks/{id}/notifications

Query parameters

Parameter Presence Data type Description Sample value
id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
alert_type optional string Type of alert server.stopped

Notification

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
id = 1191
response = token.get("#{api_url}/stacks/#{stack_id}/notifications/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/notifications/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":1191,
      "user_id":18,
      "alert_type":
      "stack.redeploy.ok",
      "channels":["email"],
      "stack_id":"5acd43412ea412e32897c40d46f91183",
      "params":{},
      "created_at":"2014-05-29T17:29:54Z",
      "updated_at":"2014-05-29T17:29:54Z"
    }
}

Get information of a single notification

HTTP Request

GET /stacks/{stack_id}/notifications/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required integer The notification ID 1191

Update Notification

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
id = 1191

channels = ['email','hipchat']
params = {:hipchat_room => 'test', :hipchat_token => 'YOUR_TOKEN'}

response = token.put("#{api_url}/stacks/#{stack_id}/notifications/#{id}.json", {body: {:channels => channels, :params => params}})

puts JSON.parse(response.body)['response']
PUT /stacks/{stack_id}/notifications/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
  {
    "id":85,
    "user_id":1,
    "alert_type":"active.protect.block",
    "channels":["email","hipchat"],
    "stack_id":"3ee97c150d95a9dc4fc801783d18087c",
    "params":{},
    "created_at":"2015-11-16T18:14:04Z",
    "updated_at":"2015-12-09T13:06:14Z"
  }
}

Update channels or params of a notification

HTTP Request

PUT /stacks/{stack_id}/notifications/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required integer The notification ID 1191
channels optional string Notification channels (valid channels are: email, ios, hipchat, webhook, slack) [email,ios]
params optional string Notification channel parameters (as JSON string with valid keys: hipchat_token, hipchat_room, slack_url, slack_channel, webhook_url) {'hipchat_room' : 'test'}

Stack settings

Settings list

id = '5999b763474b0eafa5fafb64bff0ba80'
response = token.get("#{api_url}/stacks/#{id}/settings.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id}/settings HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":[
    {
      "id":"allowed-web-source",
      "key":"allowed.web.source",
      "value":null,
      "readonly":false,
      "warning_text":""
    },
    {
      "id":"asset-prefix",
      "key":"asset.prefix",
      "value":"assets",
      "readonly":false,
      "warning_text":""
    },
    {
      "id":"git-branch",
      "key":"git.branch",
      "value":"master",
      "readonly":false,
      "warning_text":""
    },
    {
      "id":"reconfigure-nginx",
      "key":"reconfigure.nginx",
      "value":false,
      "readonly":false,
      "warning_text":""
    },
    {
      "id":"stack-name",
      "key":"stack.name",
      "value":"test-elastic-1",
      "readonly":true,
      "warning_text":"Warning! Changing this value will also modify your Cloud 66 *.c66.me DNS values"
    },
    {
      "id":"maintenance-mode",
      "key":"maintenance.mode",
      "value":false,
      "readonly":false,
      "warning_text":""

    }
  ],
  "count":5,
  "pagination":
    {
      "previous":null,
      "next":null,
      "current":1,
      "per_page":30,
      "count":6,
      "pages":1
    }
}

Get list of all settings of stack

HTTP Request

GET /stacks/{id}/settings

Query parameters

Parameter Presence Data type Description Sample value
id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80

Setting

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
id = 'git-branch'
response = token.get("#{api_url}/stacks/#{stack_id}/settings/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/settings/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "key":"git.branch",
      "value":"master"
    }
}

Get information of a single setting item

HTTP Request

GET /stacks/{stack_id}/settings/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required string The setting item ID git-branch

Update Setting

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
id = 'git-branch'
response = token.put("#{api_url}/stacks/#{stack_id}/settings/#{id}.json", {body: {:value => 'staging'}})

puts JSON.parse(response.body)['response']
PUT /stacks/{stack_id}/settings/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":7,
      "user":"test@cloud66.com",
      "resource_type":"stack",
      "action":"stack-set: git.branch",
      "resource_id":"280",
      "started_via":"api",
      "started_at":"2014-09-01T12:47:24Z",
      "finished_at":null,
      "finished_success":null,
      "finished_message":null
    }
}

Update value of a setting item

HTTP Request

PUT /stacks/{stack_id}/settings/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required integer The setting item ID git-branch
value required string The setting item new value staging

Jobs

Jobs list

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
response = token.get("#{api_url}/stacks/#{stack_id}/jobs.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id}/jobs HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
   "response":[
     {
       "uid":"98ee5a9b93919d9b63bd5377636675bd",
       "name":"rake_test",
       "type":"RakeJob",
       "cron":null,
       "status":2,
       "params":{"task":"db:migrate"},
       "created_at":"2016-02-01 13:37:07 UTC",
       "updated_at":"2016-02-01 13:37:07 UTC"
      }
   ],
    "count":1,
    "pagination":
      {
        "previous":null,
        "next":null,
        "current":1,
        "per_page":30,
        "count":1,
        "pages":1
      }
}

Get list of all jobs of a stack.

HTTP Request

GET /stacks/{id}/jobs

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string stack UID 5999b763474b0eafa5fafb64bff0ba80

Run a job

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
id = 98ee5a9b93919d9b63bd5377636675bd
response = token.get("#{api_url}/stacks/#{stack_id}/jobs/{job_id}/run_now.json")

puts JSON.parse(response.body)['response']
POST /stacks/{stack_id}/jobs/{job_id}/run_now HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":2593,
      "user":"test@example.com",
      "resource_type":"stack",
      "action":"job_run_now",
      "resource_id":"1602",
      "started_via":"api",
      "started_at":"2016-02-04T12:52:24Z",
      "finished_at":null,
      "finished_success":null,
      "finished_message":null
    }
}

Run the job.

HTTP Request

POST /stacks/{stack_id}/jobs/{job_id}/run_now

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
job_id required string Job ID 98ee5a9b93919d9b63bd5377636675bd
job_args optional string Arguments passed to the command Arg1

Server Groups

Server Groups list

id = '5999b763474b0eafa5fafb64bff0ba80'
response = token.get("#{api_url}/stacks/#{id}/server_groups.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id}/server_groups HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": [
    {
      "id": 128,
      "name": "Rails Server",
      "type": "rails",
      "created_at": "2014-08-29T17:21:47Z",
      "updated_at": "2014-08-29T17:21:47Z"
    },
    {
      "id":129,
      "name":
      "PostgreSQL Server",
      "type": "postgresql",
      "created_at": "2014-08-29T17:21:47Z",
      "updated_at":"2014-08-29T17:21:47Z"
    }
  ],
  "count": 2,
  "pagination":
    {
      "previous": null,
      "next": null,
      "current": 1,
      "per_page": 30,
      "count":2,
      "pages":1
    }
}

Get list of all server groups of stack

HTTP Request

GET /stacks/{id}/server_groups

Query parameters

Parameter Presence Data type Description Sample value
id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80

Server Group

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
id = 128
response = token.get("#{api_url}/stacks/#{stack_id}/server_groups/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/server_groups/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{

  "response":
    {
      "id": 128,
      "name": "Rails Server",
      "type": "rails",
      "created_at": "2014-08-29T17:21:47Z",
      "updated_at": "2014-08-29T17:21:47Z"
    }
}

Get information of a single server group

HTTP Request

GET /stacks/{stack_id}/server_groups/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required integer The setting group ID 128

Scale up

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
id = 53
response = token.post("#{api_url}/stacks/#{stack_id}/server_groups/#{id}.json",  {body: {:subtype => 'docker', :server_size => 't2.small'}})

puts JSON.parse(response.body)['response']
POST /stacks/{stack_id}/server_groups/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
     {
       "id":8,
       "user":"shab@shab.com",
       "resource_type":"stack",
       "action":"scale_up",
       "resource_id":"28",
       "started_via":"api",
       "started_at":"2016-04-04T18:13:14Z",
       "finished_at":null,
       "finished_success":null,
       "finished_message":null
     }
}

Scale-up a new server in server group. subtype and server_size must be passed as params.

HTTP Request

POST /stacks/{stack_id}/server_groups/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required integer The server group id 12345
subtype required string The server group type ( valid options are web, process and docker ) docker
server_size required string The server size base on your cloud t2.small
server_count optional integer The number of server to scale-up 2
server_availability_zone optional string The availability zone which you want the servers fired into (AWS EC2 only) us-east-1d
server_subnet_id optional string The subnet_id which you want the servers fired into (AWS EC2 only) subnet-123456
root_disk_type optional string Disk type, accepted values are ssd and magnetic. (AWS EC2 and GCE only) ssd
root_disk_size optional integer Default size of root disk (in GB) for servers. (AWS EC2 and GCE only) 40
server_names optional string The name of the servers backend1,backend2

Servers

Servers list

id = '5999b763474b0eafa5fafb64bff0ba80'
response = token.get("#{api_url}/stacks/#{id}/servers.json")

puts JSON.parse(response.body)['response']
GET /stacks/{id}/servers HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": [
    {
      "uid": "f8468fc145ea49bac474b30a8fea888d",
      "vendor_uid": "2492780",
      "name": "Caribou",
      "address": "146.185.133.183",
      "distro": "ubuntu",
      "distro_version": "14.04",
      "dns_record": "caribou.sb-elastic-1.dev.c66.me",
      "user_name": "root",
      "server_type": "Cloud (DigitalOcean) ",
      "server_roles": [
        "rails",
        "postgresql",
        "elasticsearch",
        "web",
        "app",
        "db"
      ],
      "server_group_id": 128,
      "stack_uid": "5acd43412ea412e32897c40d46f91183",
      "has_agent": true,
      "params":
        {
          "availability_zone": "2",
          "size": "63",
          "region": "2",
          "ips":["146.185.133.183"],
          "was_baselined": true,
          "cached_cores":1,
          "cached_memory": 1042336972,
          "passenger_version": "4.0.48",
          "passenger_enterprise": false,
          "supports_nginx_realip": true,
          "passenger_pool_max": 4
        },
      "created_at": "2014-08-29T17:21:47Z",
      "updated_at": "2014-08-29T17:54:41Z",
      "region":"2",
      "availability_zone": "2",
      "ext_ipv4": "146.185.133.183",
      "health_state": 3,
      "int_ipv4": "146.185.133.183",
      "int_ipv6": null,
      "ext_ipv6": null
    }
  ],
  "count":1,
  "pagination":
    {
      "previous": null,
      "next": null,
      "current": 1,
      "per_page": 30,
      "count": 1,
      "pages": 1
    }
}

Get list of all servers of stack

HTTP Request

GET /stacks/{id}/servers

Query parameters

Parameter Presence Data type Description Sample value
id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80

Servers

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
id = 'f8468fc145ea49bac474b30a8fea888d'
response = token.get("#{api_url}/stacks/#{stack_id}/servers/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/servers/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "uid": "f8468fc145ea49bac474b30a8fea888d",
      "vendor_uid": "2492780",
      "name": "Caribou",
      "address": "146.185.133.183",
      "distro": "ubuntu",
      "distro_version": "14.04",
      "dns_record": "caribou.sb-elastic-1.dev.c66.me",
      "user_name": "root",
      "server_type": "Cloud (DigitalOcean) ",
      "server_roles":[
        "rails",
        "postgresql",
        "elasticsearch",
        "web",
        "app",
        "db"
      ],
      "server_group_id": 128,
      "stack_uid": "5acd43412ea412e32897c40d46f91183",
      "has_agent": true,
      "params":
        {
          "availability_zone": "2",
          "size": "63",
          "region": "2",
          "ips":["146.185.133.183"],
          "was_baselined": true,
          "cached_cores": 1,
          "cached_memory": 1042336972,
          "passenger_version": "4.0.48",
          "passenger_enterprise": false,
          "supports_nginx_realip": true,
          "passenger_pool_max":4
        },
       "created_at": "2014-08-29T17:21:47Z",
       "updated_at": "2014-08-29T17:54:41Z",
       "region": "2",
       "availability_zone": "2",
       "ext_ipv4": "146.185.133.183",
       "health_state":3,
       "int_ipv4": "146.185.133.183",
       "int_ipv6": null,
       "ext_ipv6": null
    }
}

Get information of a single server

HTTP Request

GET /stacks/{stack_id}/servers/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required string The server ID f8468fc145ea49bac474b30a8fea888d
include_private_key optional integer if set to 1 then private_key will included in response 1

Reboot server

stack_id = 'a6b583684833a2cf4845079c9d9350a8'
response = token.post("#{api_url}/stacks/#{stack_id}/servers/#{server_id}/reboot_server"

puts JSON.parse(response.body)['response']
POST /stacks/{stack_id}/servers/#{server_id}/reboot_server HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":10,
      "user":"test@cloud66.com",
      "resource_type":"stack",
      "action":"server_reboot",
      "resource_id":"283",
      "started_via":"api",
      "started_at":"2016-01-01T19:08:05Z",
      "finished_at":null,
      "finished_success":null,
      "finished_message":null
    }
}

You can use this method to reboot a speific server of a stack.

HTTP Request

POST /stacks/{stack_id}/servers/#{server_id}/reboot_server

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string Unique identifier of the stack 5999b763474b0eafa5fafb64bff0ba80
server_id required string Unique identifier of the server f8468fc145ea49bac474b30a8fea888d

Server Settings

Server Settings list

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
server_id = 'f8468fc145ea49bac474b30a8fea888d'
response = token.get("#{api_url}/stacks/#{stack_id}/servers/#{server_id}/settings.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/servers/{server_id}/settings HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":[
    {
      "key":"server.name",
      "value":"Caribou",
      "readonly":true,
      "warning_text":"Warning! Changing this value will also modify your Cloud 66 *.c66.me DNS values"}
  ],
  "count":1,
  "pagination":
    {
      "previous":null,
      "next":null,
      "current":1,
      "per_page":30,
      "count":1,
      "pages":1
    }
}

Get list of all settings of a server

HTTP Request

GET /stacks/{stack_id}/servers/{server_id}/settings

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
server_id required string The server UID f8468fc145ea49bac474b30a8fea888d

Server Setting

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
server_id = 'f8468fc145ea49bac474b30a8fea888d'
id = 'server-name'
response = token.get("#{api_url}/stacks/#{stack_id}/servers/#{server_id}/settings/#{id}.json")

puts JSON.parse(response.body)['response']
GET stacks/{stack_id}/servers/{server_id}/settings/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "key":"server.name",
      "value":"Caribou"
    }
}

Get information of a single server setting item

HTTP Request

GET stacks/{stack_id}/servers/{server_id}/settings/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
server_id required string The server uid f8468fc145ea49bac474b30a8fea888d
id required string The server setting item ID server-name

Update Server Setting

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
server_id = 'f8468fc145ea49bac474b30a8fea888d'
id = 'server-name'
response = token.put("#{api_url}/stacks/#{stack_id}/servers/#{server_id}/settings/#{id}.json", {body: {:value => 'newname'}})

puts JSON.parse(response.body)['response']
PUT /stacks/{stack_id}/servers/{server_id}/settings/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":9,
      "user":"test@cloud66.com",
      "resource_type":"server",
      "action":"server-set: server.name",
      "resource_id":"445",
      "started_via":"api",
      "started_at":"2014-09-01T13:07:35Z",
      "finished_at":null,
      "finished_success":null,
      "finished_message":null
    }
}

Update value of a server setting item

HTTP Request

PUT /stacks/{stack_id}/servers/{server_id}/settings/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
server_id required string The server UID f8468fc145ea49bac474b30a8fea888d
id required string The server setting item ID server-name
value required string The server setting item new value newname

Clouds

Cloud list

response = token.get("#{api_url}/clouds.json")

puts JSON.parse(response.body)['response']
GET /clouds HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
    "response":[
       {
          "name":"aws",
          "display_name":"AWS",
          "regions":[
             {
                "id":"us-east-1",
                "name":"US East (Northern Virginia)"
             },
             {
                "id":"us-east-2",
                "name":"US East (Ohio)"
             },
             {
                "id":"us-west-1",
                "name":"US West (Northern California)"
             },
             {
                "id":"us-west-2",
                "name":"US West (Oregon)"
             },
             {
                "id":"ca-central-1",
                "name":"Canada (Central)"
             },
             {
                "id":"sa-east-1",
                "name":"South America (Sao Paulo, Brazil)"
             },
             {
                "id":"eu-central-1",
                "name":"Europe (Frankfurt, Germany)"
             },
             {
                "id":"eu-west-1",
                "name":"Europe (Dublin, Ireland)"
             },
             {
                "id":"eu-west-2",
                "name":"Europe (London)"
             },
             {
                "id":"ap-southeast-1",
                "name":"Asia Pacific (Singapore)"
             },
             {
                "id":"ap-northeast-1",
                "name":"Asia Pacific (Tokyo)"
             },
             {
                "id":"ap-southeast-2",
                "name":"Asia Pacific (Sydney)"
             },
             {
                "id":"ap-south-1",
                "name":"Asia Pacific (Mumbai)"
             }
          ],
          "server_sizes":[
             {
                "id":"t1.micro",
                "name":"Micro instance (t1.micro)"
             },
             {
                "id":"t2.micro",
                "name":"General purpose (t2.micro)"
             },
             {
                "id":"t2.small",
                "name":"General purpose (t2.small)"
             },
             {
                "id":"t2.medium",
                "name":"General purpose (t2.medium)"
             },
             {
                "id":"m1.small",
                "name":"General purpose (m1.small)"
             },
             {
                "id":"m1.medium",
                "name":"General purpose (m1.medium)"
             },
             {
                "id":"m1.large",
                "name":"General purpose (m1.large)"
             },
             {
                "id":"m1.xlarge",
                "name":"General purpose (m1.xlarge)"
             },
             {
                "id":"m3.medium",
                "name":"General purpose (m3.medium)"
             },
             {
                "id":"m3.large",
                "name":"General purpose (m3.large)"
             },
             {
                "id":"m3.xlarge",
                "name":"General purpose (m3.xlarge)"
             },
             {
                "id":"m3.2xlarge ",
                "name":"General purpose (m3.2xlarge )"
             },
             {
                "id":"c1.medium",
                "name":"Compute optimized (c1.medium)"
             },
             {
                "id":"c1.xlarge",
                "name":"Compute optimized (c1.xlarge)"
             },
             {
                "id":"c3.large",
                "name":"Compute optimized (c3.large)"
             },
             {
                "id":"c3.xlarge",
                "name":"Compute optimized (c3.xlarge)"
             },
             {
                "id":"c3.2xlarge",
                "name":"Compute optimized (c3.2xlarge)"
             },
             {
                "id":"c3.4xlarge",
                "name":"Compute optimized (c3.4xlarge)"
             },
             {
                "id":"c3.8xlarge",
                "name":"Compute optimized (c3.8xlarge)"
             },
             {
                "id":"cc2.8xlarge",
                "name":"Compute optimized (cc2.8xlarge)"
             },
             {
                "id":"m2.xlarge",
                "name":"Memory optimized (m2.xlarge)"
             },
             {
                "id":"m2.2xlarge",
                "name":"Memory optimized (m2.2xlarge)"
             },
             {
                "id":"m2.4xlarge",
                "name":"Memory optimized (m2.4xlarge)"
             },
             {
                "id":"cr1.8xlarge",
                "name":"Memory optimized (cr1.8xlarge)"
             },
             {
                "id":"hi1.4xlarge",
                "name":"Storage optimized (hi1.4xlarge)"
             },
             {
                "id":"hs1.8xlarge",
                "name":"Storage optimized (hs1.8xlarge)"
             },
             {
                "id":"cg1.4xlarge",
                "name":"GPU instances (cg1.4xlarge)"
             },
             {
                "id":"g2.2xlarge",
                "name":"GPU instances (g2.2xlarge)"
             },
             {
                "id":"i2.xlarge",
                "name":"Storage optimized (i2.xlarge)"
             },
             {
                "id":"i2.2xlarge",
                "name":"Storage optimized (i2.2xlarge)"
             },
             {
                "id":"i2.4xlarge",
                "name":"Storage optimized (i2.4xlarge)"
             },
             {
                "id":"i2.8xlarge",
                "name":"Storage optimized (i2.8xlarge)"
             },
             {
                "id":"r3.large",
                "name":"Memory optimized (r3.large)"
             },
             {
                "id":"r3.xlarge",
                "name":"Memory optimized (r3.xlarge)"
             },
             {
                "id":"r3.2xlarge",
                "name":"Memory optimized (r3.2xlarge)"
             },
             {
                "id":"r3.4xlarge",
                "name":"Memory optimized (r3.4xlarge)"
             },
             {
                "id":"r3.8xlarge",
                "name":"Memory optimized (r3.8xlarge)"
             }
          ]
       },
       {
          "name":"digitalocean",
          "display_name":"DigitalOcean",
          "regions":[
             {
                "id":"ams1",
                "name":"Amsterdam, Netherlands",
                "old_id":"2"
             },
             {
                "id":"ams2",
                "name":"Amsterdam 2, Netherlands",
                "old_id":"5"
             },
             {
                "id":"ams3",
                "name":"Amsterdam 3, Netherlands",
                "old_id":"9"
             },
             {
                "id":"nyc1",
                "name":"New York, US",
                "old_id":"1"
             },
             {
                "id":"nyc2",
                "name":"New York 2, US",
                "old_id":"4"
             },
             {
                "id":"nyc3",
                "name":"New York 3, US",
                "old_id":"8"
             },
             {
                "id":"sfo1",
                "name":"San Francisco, US",
                "old_id":"3"
             },
             {
                "id":"sgp1",
                "name":"Singapore",
                "old_id":"6"
             },
             {
                "id":"lon1",
                "name":"London, UK",
                "old_id":"7"
             }
          ],
          "server_sizes":[
             {
                "id":"512mb",
                "name":"512MB - 1 CPU"
             },
             {
                "id":"1gb",
                "name":"1GB - 1 CPU"
             },
             {
                "id":"2gb",
                "name":"2GB - 2 CPU"
             },
             {
                "id":"4gb",
                "name":"4GB - 2 CPU"
             },
             {
                "id":"8gb",
                "name":"8GB - 4 CPU"
             },
             {
                "id":"16gb",
                "name":"16GB - 8 CPU"
             },
             {
                "id":"32gb",
                "name":"32GB - 12 CPU"
             },
             {
                "id":"48gb",
                "name":"48GB - 16 CPU"
             },
             {
                "id":"64gb",
                "name":"64GB - 20 CPU"
             }
          ]
       }
    ],
    "count":2,
    "pagination":{
       "previous":null,
       "next":null,
       "current":1,
       "per_page":30,
       "count":2,
       "pages":1
    }
}

Get list of all clouds of account

HTTP Request

GET /clouds

Cloud

cloud_id = 'digitalocean'
response = token.get("#{api_url}/clouds/#{cloud_id}.json")

puts JSON.parse(response.body)['response']
GET /clouds/{cloud_id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
     {
        "name":"digitalocean",
        "display_name":"DigitalOcean",
        "regions":[
           {
              "id":"ams1",
              "name":"Amsterdam, Netherlands",
              "old_id":"2"
           },
           {
              "id":"ams2",
              "name":"Amsterdam 2, Netherlands",
              "old_id":"5"
           },
           {
              "id":"ams3",
              "name":"Amsterdam 3, Netherlands",
              "old_id":"9"
           },
           {
              "id":"nyc1",
              "name":"New York, US",
              "old_id":"1"
           },
           {
              "id":"nyc2",
              "name":"New York 2, US",
              "old_id":"4"
           },
           {
              "id":"nyc3",
              "name":"New York 3, US",
              "old_id":"8"
           },
           {
              "id":"sfo1",
              "name":"San Francisco, US",
              "old_id":"3"
           },
           {
              "id":"sgp1",
              "name":"Singapore",
              "old_id":"6"
           },
           {
              "id":"lon1",
              "name":"London, UK",
              "old_id":"7"
           }
        ],
        "server_sizes":[
           {
              "id":"512mb",
              "name":"512MB - 1 CPU"
           },
           {
              "id":"1gb",
              "name":"1GB - 1 CPU"
           },
           {
              "id":"2gb",
              "name":"2GB - 2 CPU"
           },
           {
              "id":"4gb",
              "name":"4GB - 2 CPU"
           },
           {
              "id":"8gb",
              "name":"8GB - 4 CPU"
           },
           {
              "id":"16gb",
              "name":"16GB - 8 CPU"
           },
           {
              "id":"32gb",
              "name":"32GB - 12 CPU"
           },
           {
              "id":"48gb",
              "name":"48GB - 16 CPU"
           },
           {
              "id":"64gb",
              "name":"64GB - 20 CPU"
           }
        ]
     }
}

Get information about a single cloud of an account

HTTP Request

GET /clouds/{cloud_id}

Query parameters

Parameter Presence Data type Description Sample value
cloud_id required string The cloud ID (name) digitalocean

Backups

Backups list

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
response = token.get("#{api_url}/stacks/#{stack_id}/backups.json", {body: {:db_type => 'mysql'}})

puts JSON.parse(response.body)['response']
GET /stacks/{id}/backups HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":[
    {
      "id":4,
      "server_uid":"e63e859d5ab72b0bcf14321f0ffb013d",
      "db_type":"mysql",
      "database_name":"test-db",
      "file_base":"",
      "backup_date_iso":"2014-09-01T19:00:33Z",
      "backup_status":0,
      "backup_result":"",
      "restore_status":0,
      "restore_result":null,
      "created_at_iso":"2014-09-01T19:00:33Z",
      "updated_at_iso":"2014-09-01T19:00:33Z",
      "verify_status":0,
      "verify_result":null,
      "storage_path":"2aad2bb5a70e621ecf251fbd85af6927/backups/3c656a1bcc160769762763c6276c18b9/mysql/test_db_11/2014.09.01.19.00.31",
      "skip_tables":"","backup_size":0
    },
    {
      "id":1,
      "server_uid":"e63e859d5ab72b0bcf14321f0ffb013d",
      "db_type":"mysql",
      "database_name":"test-db",
      "file_base":"",
      "backup_date_iso":"2014-09-01T18:16:16Z",
      "backup_status":0,
      "backup_result":"",
      "restore_status":0,
      "restore_result":null,
      "created_at_iso":"2014-09-01T18:16:16Z",
      "updated_at_iso":"2014-09-01T18:16:16Z",
      "verify_status":0,
      "verify_result":null,
      "storage_path":"2aad2bb5a70e621ecf251fbd85af6927/backups/3c656a1bcc160769762763c6276c18b9/mysql/test_db_11/2014.09.01.18.16.14",
      "skip_tables":"","backup_size":0
    }
  ],
  "count":2,
  "pagination":
    {
      "previous":null,
      "next":null,
      "current":1,
      "per_page":30,
      "count":2,
      "pages":1
    }
}

Get list of all backups of stack.

HTTP Request

GET /stacks/{id}/backups

Query parameters

Parameter Presence Data type Description Sample value
id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
group optional integer Backup group ID 15
db_type optional string Backup database type (valid options are: mysql, postgresql, redis, mongodb) mysql

Backup

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
id = 4153
response = token.get("#{api_url}/stacks/#{stack_id}/backups/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/backups/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "id":1,
      "server_uid":"e63e859d5ab72b0bcf14321f0ffb013d",
      "db_type":"mysql",
      "database_name":"shab-test-db",
      "file_base":"",
      "backup_date_iso":"2014-09-01T18:16:16Z",
      "backup_status":0,
      "backup_result":"",
      "restore_status":0,
      "restore_result":null,
      "created_at_iso":"2014-09-01T18:16:16Z",
      "updated_at_iso":"2014-09-01T18:16:16Z",
      "verify_status":0,
      "verify_result":null,
      "storage_path":"2aad2bb5a70e621ecf251fbd85af6927/backups/3c656a1bcc160769762763c6276c18b9/mysql/test_db_11/2014.09.01.18.16.14",
      "skip_tables":"",
      "backup_size":0
    }
}

Get information about a single backup.

HTTP Request

GET /stacks/{stack_id}/backups/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
id required integer Backup ID 4153

New Backup

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
response = token.post("#{api_url}/stacks/#{stack_id}/backups.json", {body: {:db_type => 'mysql', :keep_count => 10}})

puts JSON.parse(response.body)['response']
POST /stacks/{stack_id}/backups HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "ok":true,
      "message":"queued for creation"
    }
}

Create a new backup task.

HTTP Request

POST /stacks/{stack_id}/backups

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
db_type optional string Comma separated list of Database types which need backup tasks (valid options: all, mysql, postgresql, redis, mongodb) mysql,redis
frequency optional string Frequency of backup task in cron schedule format 0 */1 * * *
keep_count optional integer Number of previous backups to keep 10
gzip optional boolean Compress your backups with gzip. false
excluded_tables optional string Tables that must be excluded from the backup my_log_table
run_on_replica_server optional boolean Run backup task on replica server if available false

Import Backup

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
remote_url = 'https://s3.amazonaws.com/c66-managed-backup-non-prod/2aad2bb5a70e621ecf251fbd85af6927/backups/09a7dec0efdaa19b44148fccbf6128ec/redis/redis_23/2014.07.01.07.00.46/redis_23.tar'
response = token.post("#{api_url}/stacks/#{stack_id}/backups.json", {body: {:db_type => 'mysql', :group => 5, :remote_url => remote_url}})

puts JSON.parse(response.body)['response']
POST /stacks/{stack_id}/backups HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "ok":true,
      "message":"Your external backup queued for upload"
    }
}

Import an external backup.

HTTP Request

POST /stacks/{stack_id}/backups

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
group required integer The group ID of backups that imported backup must restored in 5
db_type required string Comma separated list of Database types which need backup tasks (valid options: mysql, postgresql, redis, mongodb) mysql
remote_url required string A URL to backup file to be imported https://s3.amazonaws.com/c66-managed-backup-non-prod/2aad2bb5a70e621ecf251fbd85af6927/backups/09a7dec0efdaa19b44148fccbf6128ec/redis/redis_23/2014.07.01.07.00.46/redis_23.tar

Backups files list

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
backup_id = 4153
response = token.get("#{api_url}/stacks/#{stack_id}/backups/#{backup_id}/files.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/backups/{backup_id}/files HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":[
    {
      "id":"tar",
      "name":"test_db_11.tar"
    }
  ],
  "count":1,
  "pagination":
    {
      "previous":null,
      "next":null,
      "current":1,
      "per_page":30,
      "count":1,
      "pages":1
    }

Get list of all backup files of a stack.

HTTP Request

GET /stacks/{stack_id}/backups/{backup_id}/files

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
backup_id required integer Backup ID 4153

Backup file

stack_id = '5999b763474b0eafa5fafb64bff0ba80'
backup_id = 4153
id = 'tar-aa'
response = token.get("#{api_url}/stacks/#{stack_id}/backups/#{backup_id}/files/#{id}.json")

puts JSON.parse(response.body)['response']
GET /stacks/{stack_id}/backups/{backup_id}/files/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "ok":true,
      "public_url":"https://c66-managed-backup-non-prod.s3.amazonaws.com/2aad2bb5a70e621ecf251fbd85af6927/backups/3c656a1bcc160769762763c6276c18b9/mysql/test_db_11/2014.09.01.18.16.14/test_db_11.tar?AWSAccessKeyId=AKIAIKCYITLQBEJDIETQ\u0026Expires=1409603570\u0026Signature=C2au7Jq%252F1m6uHGHRfGJPn%252F2GSS8%253D"
    }
}

Get the public URL to a backup file.

HTTP Request

GET /stacks/{stack_id}/backups/{backup_id}/files/{id}

Query parameters

Parameter Presence Data type Description Sample value
stack_id required string The stack UID 5999b763474b0eafa5fafb64bff0ba80
backup_id required integer Backup ID 4153
id required string The file ID tar-aa

Accounts

Accounts list

response = token.get("#{api_url}/accounts.json")

puts JSON.parse(response.body)['response']
GET /accounts HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": [
    {
      "id": 139,
      "owner": "test@cloud66.com",
      "created_at_iso": "2013-06-19T11:08:03Z",
      "updated_at_iso": "2014-02-20T12:55:58Z",
      "stack_count": 2,
      "used_clouds": ["digitalocean","rackspace"]
    }
  ],
  "count":1,
  "pagination":{
    "previous": null,
    "next": null,
    "current": 1,
    "per_page": 30,
    "count": 1,
    "pages": 1
  }
}

Get a list of accounts that caller belongs to.

HTTP Request

GET /accounts

Account

id = 1
response = token.get("#{api_url}/accounts/#{id}.json")

puts JSON.parse(response.body)['response']
GET /accounts/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
          "id": 139,
          "owner": "test@cloud66.com",
          "created_at_iso": "2013-06-19T11:08:03Z",
          "updated_at_iso": "2014-02-20T12:55:58Z",
          "stack_count": 2,
          "used_clouds": ["digitalocean","rackspace"]
    }
}

Get information about an account.

HTTP Request

GET /accounts/{id}

Query parameters

Parameter Presence Data type Description Sample value
id required integer The account ID 1

Users

Users list

response = token.get("#{api_url}/users.json")

puts JSON.parse(response.body)['response']
GET /users HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": [
    {
      "id": 1,
      "email": "jack@gmail.com",
      "primary_account_id": 1,
      "locked": false,
      "access_profile": {
        "account_profile": {
          "can_create_stack": true,
          "can_admin_users": true,
          "can_payment": true,
          "can_add_cloud_key": true,
          "can_del_cloud_key": true,
          "can_view_acc_notifications": true,
          "can_edit_acc_notifications": true,
          "can_view_audit": true,
          "can_view_docker_img_key": true,
          "can_del_ssh_key": true,
          "can_edit_personal_token": true,
          "can_del_authorized_app": true,
          "can_view_custom_env": true,
          "can_edit_custom_env": true,
          "can_add_developers_app": true,
          "can_del_developers_app": true,
          "can_edit_git_key": true,
          "can_edit_gateway": true,
          "default_roles": [
            "Administrator"
          ]
        },
        "stack_profiles": [
          {
            "stack_uid": "d1f1d43bb86ff3e97c9f6ff2841e42cb",
            "role": "Administrator"
          },
          {
            "stack_uid": "740f81b98eb847fab0df538ea8780d9d",
            "role": "Administrator"
          },
          {
            "stack_uid": "b5f4eaaf56b5768f272ab875d2ba48b1",
            "role": "Administrator"
          }
        ]
      },
      "uses_tfa": false,
      "timezone": "UTC",
      "has_valid_phone": false,
      "developer_program": false,
      "github_login": false,
      "last_login": "2016-01-29T15:25:20Z",
      "devices": [
        {
          "device_type": 1,
          "sub_type": 2,
          "token": "wertqy",
          "enabled": true,
          "created_at": "2014-08-04 11:57:36 UTC",
          "updated_at": "2014-08-04 12:03:22 UTC",
          "created_at_iso": "2014-08-04T11:57:36Z",
          "updated_at_iso": "2014-08-04T12:03:22Z"
        }
      ],
      "created_at": "2015-08-14T19:45:28Z",
      "updated_at": "2016-02-01T11:23:38Z",
      "cloud_status": "healthy"
    },
    {
      "id": 2,
      "email": "jim@gmail.com",
      "primary_account_id": 2,
      "locked": false,
      "access_profile": {
        "account_profile": {
          "can_create_stack": true,
          "can_admin_users": false,
          "can_payment": false,
          "can_add_cloud_key": false,
          "can_del_cloud_key": true,
          "can_view_acc_notifications": false,
          "can_edit_acc_notifications": true,
          "can_view_audit": false,
          "can_view_docker_img_key": false,
          "can_del_ssh_key": false,
          "can_edit_personal_token": false,
          "can_del_authorized_app": false,
          "can_view_custom_env": false,
          "can_edit_custom_env": false,
          "can_add_developers_app": false,
          "can_del_developers_app": false,
          "can_edit_git_key": false,
          "can_edit_gateway": false,
          "default_roles": [
            "Viewer"
          ]
        },
        "stack_profiles": [
          {
            "stack_uid": "740f81b98eb847fab0df538ea8780d9d",
            "role": "Deployer"
          },
          {
            "stack_uid": "b5f4eaaf56b5768f272ab875d2ba48b1",
            "role": "Viewer"
          },
          {
            "stack_uid": "740f81b98eb847fab0df538ea8780d9d",
            "role": "Administrator"
          },
          {
            "stack_uid": "b5f4eaaf56b5768f272ab875d2ba48b1",
            "role": "Administrator"
          }
        ]
      },
      "uses_tfa": false,
      "timezone": "UTC",
      "has_valid_phone": false,
      "developer_program": false,
      "github_login": false,
      "last_login": "2016-01-28T13:12:16Z",
      "devices": [],
      "created_at": "2016-01-28T13:12:13Z",
      "updated_at": "2016-01-28T13:12:16Z",
      "cloud_status": "healthy"
    }
  ],
  "count": 2,
  "pagination": {
    "previous": null,
    "next": null,
    "current": 1,
    "per_page": 30,
    "count": 2,
    "pages": 1
  }
}

Get list of users that caller has access to.

HTTP Request

GET /users

User

id = 1
response = token.get("#{api_url}/users/#{id}.json")

puts JSON.parse(response.body)['response']
GET /users/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response": {
    "id": 2,
    "email": "jim@gmail.com",
    "primary_account_id": 2,
    "locked": false,
    "access_profile": {
      "account_profile": {
        "can_create_stack": true,
        "can_admin_users": false,
        "can_payment": false,
        "can_add_cloud_key": false,
        "can_del_cloud_key": true,
        "can_view_acc_notifications": false,
        "can_edit_acc_notifications": true,
        "can_view_audit": false,
        "can_view_docker_img_key": false,
        "can_del_ssh_key": false,
        "can_edit_personal_token": false,
        "can_del_authorized_app": false,
        "can_view_custom_env": false,
        "can_edit_custom_env": false,
        "can_add_developers_app": false,
        "can_del_developers_app": false,
        "can_edit_git_key": false,
        "can_edit_gateway": false,
        "default_roles": [
          "Viewer"
        ]
      },
      "stack_profiles": [
        {
          "stack_uid": "740f81b98eb847fab0df538ea8780d9d",
          "role": "Deployer"
        },
        {
          "stack_uid": "b5f4eaaf56b5768f272ab875d2ba48b1",
          "role": "Viewer"
        },
        {
          "stack_uid": "740f81b98eb847fab0df538ea8780d9d",
          "role": "Administrator"
        },
        {
          "stack_uid": "b5f4eaaf56b5768f272ab875d2ba48b1",
          "role": "Administrator"
        }
      ]
    },
    "uses_tfa": false,
    "timezone": "UTC",
    "has_valid_phone": false,
    "developer_program": false,
    "github_login": false,
    "last_login": "2016-01-28T13:12:16Z",
    "devices": [],
    "created_at": "2016-01-28T13:12:13Z",
    "updated_at": "2016-01-28T13:12:16Z",
    "cloud_status": "healthy"
  }
}

Get detailed information about a user.

HTTP Request

GET /users/{id}

Query parameters

Parameter Presence Data type Description Sample value
id required integer The user UID 1

Update User

id = 1
response = token.put("#{api_url}/users/#{id}.json", {body: { payload }})
# payload is a the same as the result of GET /user/{id}.json
PUT /users/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
    "id": 2,
    "email": "jim@gmail.com",
    "primary_account_id": 2,
    "locked": false,
    "access_profile": {
      "account_profile": {
        "can_create_stack": true,
        "can_admin_users": false,
        "can_payment": false,
        "can_add_cloud_key": false,
        "can_del_cloud_key": true,
        "can_view_acc_notifications": false,
        "can_edit_acc_notifications": true,
        "can_view_audit": false,
        "can_view_docker_img_key": false,
        "can_del_ssh_key": false,
        "can_edit_personal_token": false,
        "can_del_authorized_app": false,
        "can_view_custom_env": false,
        "can_edit_custom_env": false,
        "can_add_developers_app": false,
        "can_del_developers_app": false,
        "can_edit_git_key": false,
        "can_edit_gateway": false,
        "default_roles": [
          "Viewer"
        ]
      },
      "stack_profiles": [
        {
          "stack_uid": "740f81b98eb847fab0df538ea8780d9d",
          "role": "Deployer"
        },
        {
          "stack_uid": "b5f4eaaf56b5768f272ab875d2ba48b1",
          "role": "Viewer"
        },
        {
          "stack_uid": "740f81b98eb847fab0df538ea8780d9d",
          "role": "Administrator"
        },
        {
          "stack_uid": "b5f4eaaf56b5768f272ab875d2ba48b1",
          "role": "Administrator"
        }
      ]
    },
    "uses_tfa": false,
    "timezone": "UTC",
    "has_valid_phone": false,
    "developer_program": false,
    "github_login": false,
    "last_login": "2016-01-28T13:12:16Z",
    "devices": [],
    "created_at": "2016-01-28T13:12:13Z",
    "updated_at": "2016-01-28T13:12:16Z",
    "cloud_status": "healthy"
}

Update user information. Currently only access profile section changes are applied.

HTTP Request

GET /users/{id}

Query parameters

Parameter Presence Data type Description Sample value
id required integer The user UID 1

Add Device

id = 1
token = 'htyukjbnnmshthkr'
response = token.post("#{api_url}/users/#{id}/devices.json", {body: {:device_type => 1, :sub_type => 1, :token => token}})

puts JSON.parse(response.body)['response']
POST /users/{id}/devices HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
  "response":
    {
      "device_type": 1,
      "sub_type": 1,
      "token": "mmccdd",
      "enabled": true,
      "created_at": "2014-09-01 09:15:50 UTC",
      "updated_at": "2014-09-01 09:15:50 UTC",
      "created_at_iso": "2014-09-01T09:15:50Z",
      "updated_at_iso": "2014-09-01T09:15:50Z"
    }
}

Add a new device for the user.

HTTP Request

POST /users/{id}/devices

Query parameters

Parameter Presence Data type Description Sample value
id required integer The user UID 1
device_type required integer Device type (1 = iOS, 2 = Android) 1
sub_type required integer Device subtype (1 = iPhone, 2 = iPad, 3 = iPod) 1
token required string The token of the device htyukjbnnmshthkr

Update Device

id = 1
token = 'htyukjbnnmshthkr'
response = token.put("#{api_url}/users/#{id}/devices.json", {body: {:device_type => 1, :sub_type => 1, :token => token}})

puts JSON.parse(response.body)['response']
PUT /users/{id}/devices HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

Update device_type or sub_type of a device

HTTP Request

PUT /users/{id}/devices

Query parameters

Parameter Presence Data type Description Sample value
id required integer The user UID 1
device_type required integer Device type (1 = iOS, 2 = Android) 1
sub_type required integer Device subtype (1 = iPhone, 2 = iPad, 3 = iPod) 1
token required string The token of the device htyukjbnnmshthkr

Delete Device

id = 1
token = 'htyukjbnnmshthkr'
response = token.delete("#{api_url}/users/#{id}/devices/#{token}.json")

puts JSON.parse(response.body)['response']
DELETE /users/{id}/devices/{token} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

Delete a device

HTTP Request

DELETE /users/{id}/devices/{token}

Query parameters

Parameter Presence Data type Description Sample value
id required integer The user UID 1
token required string The token of the device htyukjbnnmshthkr

Gateways

Gateways list

account_id = '1234'
response = token.get("#{api_url}/accounts/#{account_id}/gateways.json")

puts JSON.parse(response.body)['response']
GET /accounts/{account_id}/gateways HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{
   "response":[
      {
        "id"=>1,
        "name"=>"aws_bastion",
        "username"=>"ec2-usr",
        "address"=>"1.1.1.1",
        "private_ip"=>"2.2.2.2",
        "ttl"=>"2016-02-01T14:46:38Z",
        "content"=>"N/A",
        "created_at_iso"=>"2016-02-01T14:37:05Z",
        "updated_at_iso"=>"2016-02-01T14:47:01Z",
        "created_by"=>"user1@cloud66.com",
        "updated_by"=>"user1@cloud66.com"
      }
   ],
   "count":1,
   "pagination":{
      "previous":null,
      "next":null,
      "current":1,
      "per_page":30,
      "count":1,
      "pages":1
   }
}

Get a list of all the gateways of the account

HTTP Request

GET /accounts/{account_id}/gateways

Query parameters

Parameter Presence Data type Description Sample value
account_id required string The account id 12345

Gateway Create

account_id = '1234'
response = token.post("#{api_url}/accounts/#{account_id}/gateways.json", {body: {:name => 'aws_test', :username => 'ec2-usr', :address => '1.1.1.1', :ttl => 3600, :private_ip => '2.2.2.2', :content => 'xxxxxxxxxxxxx'}})

puts JSON.parse(response.body)['response']
POST /accounts/{account_id}/gateways HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

{ "response":
    {
        "ok": true
    }
}

Create a new gateway under the account. name must be passed as params. You can also specify username , address, ttl, private_ip and content as params.

HTTP Request

POST /accounts/{account_id}/gateways

Query parameters

Parameter Presence Data type Description Sample value
account_id required string The account id 12345
name required string New gateway name new_gateway_name
username optional string Username of bastion server ec2-usr
address optional string Public IP or DNS address of bastion server 1.1.1.1
ttl optional integer The number of seconds you want the gateway available 3600
private_ip optional string Private IP or DNS address of bastion server 2.2.2.2
content optional string The content of private key of bastion server xxxxxxxx

Update Gateway

account_id = '1234'
id = 1

response = token.put("#{api_url}/accounts/#{account_id}/gateways/#{id}.json", {body: { :name => 'new_name', :username => 'ubuntu' , :address => '1.2.3.4' }})

puts JSON.parse(response.body)['response']

PUT /accounts/{account_id}/gateways/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
{ "response":
    {
        "ok": true
    }
}

Update gateway information.

HTTP Request

PUT /accounts/{account_id}/gateways/{id}

Query parameters

Parameter Presence Data type Description Sample value
id required integer The gateway id 1
account_id required string The account id 12345
name optional string Gateway name new_gateway_name
username optional string Username of bastion server ec2-usr
address optional string Public IP or DNS address of bastion server 1.1.1.1
ttl optional integer The number of seconds you want the gateway available 3600
private_ip optional string Private IP or DNS address of bastion server 2.2.2.2
content optional string The content of private key of bastion server xxxxxxxx

Delete Gateway

account_id = '1234'
id = 1
response = token.delete("#{api_url}/accounts/#{account_id}/gateways/#{id}.json")
puts JSON.parse(response.body)['response']
DELETE /accounts/{account_id}/gateways/{id} HTTP/1.1
X-RateLimit-Limit: 3600
X-RateLimit-Remaining: 3597
HTTP/1.1 200 OK
Content-Type: application/json

Delete a gateway

HTTP Request

DELETE /accounts/{account_id}/gateways/{id}

Query parameters

Parameter Presence Data type Description Sample value
id required integer The gateway id 1
account_id required string The account id 12345