Back to top

API Overview and Access

Aperçu

Cloud Application Manager provides an API to programmatically configure and deploy complex box configurations to public, private cloud providers, or your own infrastructure.

The Cloud Application Manager API is especially useful for these scenarios:

  • To automate and integrate Cloud Application Manager features within larger build, deployment frameworks like Jenkins continuous development and integration.

  • To integrate Cloud Application Manager features within external applications and interfaces. For example, you can provide detailed reporting on box, workspace, and provider usage.

  • To automate deployment actions in custom applications where your application can call Cloud Application Manager features on demand.

You can embed API requests within your existing Python, Ruby, Java, C, C++, Go, and other such code using common API actions such as GET, POST, DELETE, and PUT.

Headers

All request headers must have three elements: Content-Type, ElasticBox-Token, and ElasticBox-Release.

Content-Type

The REST API supports HTTP requests and responses in JSON format. All your request headers must identify the JSON content type.

ElasticBox-Token

The token based on a user's account authorizes access to data in Cloud Application Manager. Typically, you want the user to have broad access to Cloud Application Manager data like a user with administrator privileges. API requests from external applications should be made as this user. API responses return data based on this user's access level in Cloud Application Manager.
Tokens assure a secure way to connect to Cloud Application Manager without compromising credentials while you make API requests over the web. Tokens work for any type of authentication whether that's username, password, Google, GitHub, or LDAP. We authorize token access using basic authentication.
Follow these steps to get a token from your Cloud Application Manager account.

Steps

  1. Sign in to the Cloud Application Manager website.

  2. From the user drop-down menu on the right, click Authentication Tokens.

    api1

  3. Enter a descriptive name for the token and click Create Token.

    api2

  4. Use the clipboard icon to copy the token to then pass it in your API request headers.

More on Tokens

  • You can create and use up to 50 tokens.
  • Tokens never expire. To invalidate an API call, simply delete the token that’s used.
  • When making API calls to the Providers resource, additional provider token limits may apply. To learn about these limits, check your provider documentation.

ElasticBox-Release

As part of the request headers, specify the latest version of the Cloud Application Manager release, which is 4.0.

Example

Headers for a sample request look like this.

Headers:

Content-Type: application/json
ElasticBox-Token: 46-cbd2-4273-85b8-e2bba8ed265a
ElasticBox-Release: 4.0

Contacting Cloud Application Manager Support

We’re sorry you’re having an issue in Cloud Application Manager. Please review the troubleshooting tips, or contact Cloud Application Manager support with details and screenshots where possible.

For issues related to API calls, send the request body along with details related to the issue.

In the case of a box error, share the box in the workspace that your organization and Cloud Application Manager can access and attach the logs.

  • Linux: SSH and locate the log at /var/log/elasticbox/elasticbox-agent.log
  • Windows: RDP into the instance to locate the log at ProgramDataElasticBoxLogselasticbox-agent.log

Latest Changes

Main Changes in This Release

This article covers the main API changes to the endpoints for boxes, instances, workspaces, and profiles.

In this article:

  • What’s new
  • Sample API calls
  • Schema

What’s New

Endpoint Added, Changed, or Removed
Instances Added
  • New Endpoint that updates an active instance by applying a box version.
    • PUT /services/instances/{instance_id}/pull.
  • Parameters: automatic_updates, box, policy_box
    • PUT /services/instances/{instance_id}
    • GET /services/instances
  • Parameters: automatic_updates, box, policy_box, instance_tags, ipv4_address (only for deploying using the Cloud Application Manager agent on any infrastructure).
    • POST /services/instances
    • POST /services/instances/dryrun

Removed
  • Parameter: environment.
    • PUT /services/instances/{instance_id}
    • GET /services/instances
  • Parameter: environment, profile, variables.
    • POST /services/instances
    • POST /services/instances/dryrun
Boxes Changed
The boxes endpoint accepts four box types now. When you call a box, use one of the following schemas:
  • Script box
  • Deployment policy box
  • CloudFormation box
  • Docker container box

Removed
Parameters:
  • tags are deprecated. Use requirements or claims instead.
  • service
Workspaces Removed
This particular operation on the workspaces endpoint:
  • GET /services/workspaces/{workspace_id}/profiles
Profiles Removed
All operations on the profiles endpoint are deprecated and replaced by deployment policy boxes
  • GET /services/profiles
  • POST /services/profiles
  • GET /services/profiles/{profile_id}
  • PUT /services/profiles/{profile_id}
  • DELETE /services/profiles/{profile_id}
Organizations Removed
  • Parameter: admin_boxes
    • GET /services/organizations/{organization_name}
    • POST /services/organizations
    • PUT /services/organizations/{organization_name}
Providers Removed
  • Parameter: admin_box
    • GET /services/providers
    • POST /services/providers
    • GET /services/providers/{provider_id}
    • PUT /services/providers/{provider_id}

Instances

Endpoint

PUT /services/instances/{instance_id}/pull

New endpoint that updates an active instance by applying a box version.

Requête

Parameter Type Description
box_id chaîne Required. ID of the box version used to update the instance. The version should relate to the box currently deployed on the instance.

Réponse

Aucun.


Boxes

Script box

  • Deployment policy box
  • CloudFormation box
  • Docker container box
  • Script Box

This box’s type behaves just like the old boxes.

Endpoint

/services/boxes

Schema

http://elasticbox.net/schemas/boxes/script

New parameters

Parameter Type Description
automatic_updates chaîne Required. Specify an option: off, major, minor, or patch. Default is off.
draft_from guid Optional. ID of the box version that this box is a draft from.
requirements array Required. Contains strings like tags. Specifies the runtime technologies the box requires to deploy.

Changed parameters

Parameter Type Description
events objet Optional. Contains these events: pre_configure, configure, pre_install, install, pre_start, start, stop, post_stop, dispose, post_dispose. Each refers to a blob of the script.
Note: The post_install, post_configure, and post_start events are deprecated. The new events are pre_install, pre_configure, and pre_start.
version objet Optional. Requires these properties:
  • box: Of type guid. Identifies the ID of the box to which the version belongs.
  • description. Of type string, describes the change to the box version.
  • number. Of type object, specifies the version number as an integer in this format: major, minor, and patch. For example to represent version 1.4.5, you would specify major:1, minor:4, patch:5.

Deployment Policy Box

This box type replaces the old deployment profiles, but it contains the same information of a deployment profile including box properties.

Note: In contrast with Script Boxes, the deployment policy boxes do not include these parameters: events, requirements.

Endpoint

/services/boxes

Schema

http://elasticbox.net/schemas/boxes/policy

New parameters

Parameter Type Description
profile objet Required. Describes all the properties to deploy an instance of a box. Contains the same data as the old deployment profile endpoint.
provider_id objet Required. Specifies the ID of the provider.
draft_from guid Optional. ID of the box version that this box is a draft from.
claims array Required. An array of strings, specifies the requirements applied to a box.
automatic_updates chaîne Required. Specify an option: off, major, minor, or patch. Default is off.

CloudFormation Box

Note: In contrast with Script Boxes, the CloudFormation boxes do not include the parameter: events.

Endpoint

/services/boxes

Schema

http://elasticbox.net/schemas/boxes/cloudformation

New parameters

Parameter Type Description
profile objet Describes all the properties to deploy an instance of a box. Contains the same data as the old deployment profile endpoint. Only accepts AWS information. It is not required by CloudFormation template boxes
automatic_updates chaîne Required. Specify an option: off, major, minor, or patch. Default is off.
provider_id objet Required. Specifies the ID of an AWS provider.
type objet Required. Specifies a service. Accepted value is: CloudFormation Service.
draft_from guid Optional. ID of the box version that this box is a draft from.
requirements array Required. Contains strings like tags. Specifies the runtime technologies a box requires to deploy.

Docker Container Box

Endpoint

/services/boxes

Schema

http://elasticbox.net/schemas/boxes/docker

New parameters

Parameter Type Description
dockerfile objet Optional. Refers to the schema of the blob that contains the dockerfile script. This replaces the Docker box variable previously known as DOCKER_FILE.
automatic_updates chaîne Required. Specify an option: off, major, minor, or patch. Default is off.
draft_from guid Optional. ID of the box version that this box is a draft from.
requirements array Required. Contains strings like tags. Specifies the runtime technologies a box requires to deploy.

Sample API Calls

  • Boxes
  • Instances
  • Organizations
  • Providers
  • Deploy instance request
  • Instance
  • Version
  • Boxes

GET /services/boxes

This request returns boxes of all types: script, policy, cloudformation, and docker.

Requête

Aucun.

Réponse

Returns an array of the boxes (cloudformation, docker, script, policy).

{
    "description": "Cookbook with a simple recipe",
    "automatic_updates": "off",
    "requirements": [
        "linux"
    ],
    "name": "Chef Cookbook",
    ...
     "schema": "http://elasticbox.net/schemas/boxes/script"
}
},
{
    "automatic_updates": "off",
    "requirements": [],
    "name": "MyCloudFormation",
     ...
    "schema": "http://elasticbox.net/schemas/boxes/cloudformation"
},
{
    "automatic_updates": "off",
    "requirements": [
        "docker"
    ],
    "name": "Docker RabbitMQ",
    "dockerfile": {
        "url": "/services/blobs/download/54feda7093abba06c7591422/Dockerfile",
        "upload_date": "2015-03-10 11:50:07.960399",
        "length": 30,
        "content_type": "text/x-shellscript"
    },
    "schema": "http://elasticbox.net/schemas/boxes/docker"
}

PUT /services/boxes/{box_id}/diff

Requête

Box schema.

{
  "profile": {
      "instances": 1,
      "keypair': 'test_keypair",
      "location': 'SimulatedLocation",
      "image': 'test",
      "flavor': 'test.small",
      "schema': 'http://elasticbox.net/schemas/test/compute/profile"
  },
  "provider_id": "720d78f5-1139-4526-872f-bcddcd20b9b7",
  "automatic_updates": "off",
  "deleted": None,
  "variables": [

  ],
  "name": "MyPolicy",
  "version": {
      "box": "596ea6d6-faeb-46f7-bcd8-bd2b7fc2db15",
      "number": {
          "major": 0,
          "minor": 1,
          "patch": 1
      },
      "workspace": "operations",
      "description": "SmallVMtype"
  },
  "claims": [
      "linux"
  ],
  "draft_from": "54cbac10-44a0-4c4f-8580-f0f66e34d9dd",
  "schema": "http://elasticbox.net/schemas/boxes/policy"
}

Réponse

The diff JSON has changed, it now includes the property ‘box_profile_properties’ if using a deployment policy box.

{
  "box_variables": {
      "removed": [],
      "files_diff": [],
      "added": [],
      "changed": []
  },
  "box_profile_properties": {
      "title": "Modified Box Profile properties",
      "removed": [],
      "added": [],
      "changed": [
          {
              "new": "test.small",
              "name": "flavor",
              "previous": "test.micro"
          }
      ]
  },
  "box_details": {
      "removed": [],
      "added": [],
      "changed": []
  },
  "box_events": [],
  "changed": true
}

Instances

GET /services/instances

Removed parameter

environment

New parameters

Parameter Type Description
automatic_updates chaîne Required. Specify an option: off, major, minor, or patch. Default is off.
box chaîne Required. ID of the box (not version) deployed on the instance.
policy_box chaîne Optional. Is a deployment policy or a CloudFormation box.

Requête

Aucun.

Réponse

Array of instance schema.

[
    {
        "automatic_updates": "off",
        "box" : "f61a336d-4807-4220-891f-e56ef8c54326",
        "name": "TestBox",
        "policy_box" : {
            "profile" : {
               "image" : "test",
               "instances" : 1,
               "keypair" : "test_keypair",
               "location" : "Simulated Location",
               "flavor" : "test.micro",
               "schema" : "http://elasticbox.net/schemas/test/compute/profile"
            },
            "provider_id" : "26fd7fac-ff2a-4e24-a01d-708bff07fb9a",
            "automatic_updates" : "off",
            ...
            "claims" : [],
            "schema" : "http://elasticbox.net/schemas/boxes/policy"
        },

        "boxes": [
           ...
        ],
      ...
        "operation": "deploy",
    },
...
]

POST /services/instances

Removed parameters

environment, profile, variables

New parameters

Parameter Type Description
automatic_updates chaîne Required. Specify an option: off, major, minor, or patch. Default is off.
box objet Required. Contains two parameters:
  • id: Of type string, is the ID of the script box (not version) to deploy on the instance.
  • variables: Of type array, are the variables from the script box.
policy_box objet Required. Contains two parameters:
  • id: Of type string, is the ID of the deployment policy box (not version) to deploy on the instance.
  • variables: Of type array, are the variables from the deployment policy box.
instance_tags Array Optional. Custom tags to describe an instance.
ipv4_address chaîne Optional. IP address of the machine where you want to run the Cloud Application Manager agent to deploy a box.

Requête

Contains the schema to deploy an instance.

{
  "box": {
      "variables": [

      ],
      "id": "32375764-f73a-41ca-8268-12ac1785586e"
  },
  "automatic_updates": "off",
  "name": "TestBox",
  "policy_box": {
      "variables": [

      ],
      "id": "e109e536-e437-4707-8048-cbf8b09c9307"
  },
  "environment": "TestBox",
  "instance_tags": [

  ],
  "schema": "http://elasticbox.net/schemas/deploy-instance-request"
}

Réponse

Returns the schema of the deployed instance.

{
  "box": "6c714599-f045-4476-9068-5c34effa618f",
  "policy_box": {
      "profile": {
          "image": "test",
          "instances": 1,
          "keypair": "test_keypair',
          "location": "SimulatedLocation",
          "flavor": 'test.micro",
          "schema": 'http://elasticbox.net/schemas/test/compute/profile'
      },
      'provider_id': 'ffe0da74-c96a-413d-b534-8f112f051043',
      'automatic_updates': 'off',
      'name': 'admin_box-2ec08eb02dDeployPolicy',
      ...
      'claims': [
          'linux'
      ],
      'schema': 'http://elasticbox.net/schemas/boxes/policy'
  },
  'automatic_updates': 'off',
  'name': 'TestBox',
  'boxes': [
      {
   ...
      }
  ],
  'operation': 'deploy',
  'schema': 'http://elasticbox.net/schemas/instance'
}

Organizations

GET /services/organizations/{organization_name}

Removed parameter

admin_boxes

Requête

Aucun.

Réponse

Returns the organization schema.

{
  "schema": "http://elasticbox.net/schemas/organization",
  "name": "elasticbox",
  "features": {
           "cost_center": false,
           "custom_pricing": false,
           "onboard_checklist": false,
           “provider_sharing": true,
           "reporting": false
  },
  ...
       "webhooks": []
}

Providers

GET /services/providers

Removed parameter

admin_box

Requête

Aucun.

Réponse

Returns an array of the provider schema.

{
      "state": "ready",
      "services": [
          {
              "name": "Linux Compute"
          }
      ],
      "type": "Test Provider",
      ...
      "name": "report-c04cbc85dc"
}

Schema

  • Organization
  • Provider
  • Script Box
  • Policy box
  • Container Box
  • CloudFormation Box

Organization

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://elasticbox.net/schemas/organization",
    "additionalProperties": false,
    "allOf": [
        {
            "$ref": "http://elasticbox.net/schemas/object-timestamp"
        },
        {
            "type": "object",
            "required": [
                "schema",
                "name",
                "domains",
                "administrators",
                "authentication",
                "features",
                "cost_centers"
            ],
            "properties": {
                "authentication": {
                    "type": "object",
                    "required": [
                        "github",
                        "google",
                        "password",
                        "ldap"
                    ],
                    "default": {
                        "github": true,
                        "google": true,
                        "ldap": false,
                        "ldap_config": {},
                        "password": true
                    },
                    "properties": {
                        "github": {
                            "type": "boolean",
                            "default": true
                        },
                        "google": {
                            "type": "boolean",
                            "default": true
                        },
                        "ldap": {
                            "type": "boolean",
                            "default": false
                        },
                        "ldap_config": {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                                "sources": {
                                    "type": "array",
                                    "default": [],
                                    "items": {
                                        "type": "object",
                                        "required": [
                                            "host"
                                        ],
                                        "properties": {
                                            "base_dn_filter": {
                                                "type": "string",
                                                "maxLength": 512
                                            },
                                            "email_field": {
                                                "type": "string",
                                                "maxLength": 256
                                            },
                                            "group_dn_filter": {
                                                "type": "string",
                                                "maxLength": 512
                                            },
                                            "groups_dn": {
                                                "type": "string",
                                                "maxLength": 512
                                            },
                                            "host": {
                                                "type": "string",
                                                "maxLength": 256
                                            }
                                        }
                                    }
                                }
                            }
                        },
                        "password": {
                            "type": "boolean",
                            "default": true
                        }
                    }
                },
                "features": {
                    "type": "object",
                    "required": [
                        "provider_sharing",
                        "cost_center",
                        "onboard_checklist",
                        "reporting"
                    ],
                    "default": {
                        "cost_center": false,
                        "custom_pricing": false,
                        "onboard_checklist": false,
                        "provider_sharing": true,
                        "reporting": false
                    },
                    "properties": {
                        "cost_center": {
                            "type": "boolean",
                            "default": false
                        },
                        "custom_pricing": {
                            "type": "boolean",
                            "default": false
                        },
                        "onboard_checklist": {
                            "type": "boolean",
                            "default": false
                        },
                        "provider_sharing": {
                            "type": "boolean",
                            "default": true
                        },
                        "reporting": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                },
                "icon": {
                    "type": "string",
                    "maxLength": 256
                },
                "name": {
                    "type": "string",
                    "maxLength": 256
                },
                "schema": {
                    "type": "string",
                    "enum": [
                        "http://elasticbox.net/schemas/organization"
                    ]
                },
                "theme": {
                    "type": "string",
                    "maxLength": 256
                },
                "administrators": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                    }
                },
                "cost_centers": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "type": "object",
                        "required": [
                            "name",
                            "workspaces",
                            "quotas"
                        ],
                        "additionalProperties": false,
                        "properties": {
                            "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 125
                            },
                            "quotas": {
                                "type": "array",
                                "default": [],
                                "items": {
                                    "type": "object",
                                    "properties": {
                                        "cost": {
                                            "type": "integer",
                                            "description": "Quota in in decimal of the currency units per month."
                                        },
                                        "provider": {
                                            "$ref": "http://elasticbox.net/schemas/guid"
                                        }
                                    }
                                }
                            },
                            "workspaces": {
                                "type": "array",
                                "default": [],
                                "items": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 64
                                }
                            }
                        }
                    }
                },
                "domains": {
                    "type": "array",
                    "default": [],
                    "properties": {
                        "items": {
                            "type": "string",
                            "maxLength": 256
                        }
                    }
                },
                "providers": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "type": "object",
                        "required": [
                            "description",
                            "enabled",
                            "pricing",
                            "type"
                        ],
                        "properties": {
                            "type": {
                                "type": "string",
                                "enum": [
                                    "Amazon Web Services",
                                    "Amazon Web Services GovCloud",
                                    "Cloudstack",
                                    "Google Compute",
                                    "Microsoft Azure",
                                    "Rackspace",
                                    "SoftLayer",
                                    "Openstack",
                                    "Test Provider",
                                    "VMware vCloud Director",
                                    "VMware vSphere"
                                ]
                            },
                            "description": {
                                "type": "string",
                                "maxLenght": 256
                            },
                            "enabled": {
                                "type": "boolean",
                                "default": false
                            },
                            "pricing": {
                                "type": "array",
                                "default": [],
                                "items": {
                                    "type": "object",
                                    "oneOf": [
                                        {
                                            "$ref": "http://elasticbox.net/schemas/gce/compute/pricing"
                                        },
                                        {
                                            "$ref": "http://elasticbox.net/schemas/aws/compute/pricing"
                                        },
                                        {
                                            "$ref": "http://elasticbox.net/schemas/azure/compute/linux/pricing"
                                        },
                                        {
                                            "$ref": "http://elasticbox.net/schemas/azure/compute/windows/pricing"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "type": "object",
                        "required": [
                            "name",
                            "type"
                        ],
                        "additionalProperties": false,
                        "properties": {
                            "type": {
                                "enum": [
                                    "Location",
                                    "Custom",
                                    "Workspace",
                                    "Workspace name",
                                    "Workspace ID",
                                    "Provider",
                                    "Provider name",
                                    "Environment",
                                    "Box",
                                    "Box name",
                                    "User ID",
                                    "Email",
                                    "User email",
                                    "Service Instance ID",
                                    "Service ID",
                                    "Instance ID"
                                ]
                            },
                            "name": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 125
                            },
                            "value": {
                                "type": "string",
                                "maxLength": 254
                            }
                        }
                    }
                },
                "webhooks": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 512,
                        "not": {
                            "type": "null"
                        }
                    }
                }
            }
        }
    ]
}

Provider

This schema uses a CloudStack example.

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://elasticbox.net/schemas/gce/provider",
    "type": "object",
    "additionalProperties": false,
    "allOf": [
        {
            "$ref": "http://elasticbox.net/schemas/object-base"
        },
        {
            "$ref": "http://elasticbox.net/schemas/shareable"
        },
        {
            "type": "object",
            "required": [
                "schema",
                "icon",
                "type",
                "email",
                "credentials",
                "project_id",
                "state",
                "services",
                "deleted",
                "organization"
            ],
            "properties": {
                "type": {
                    "type": "string",
                    "default": "Google Compute",
                    "enum": [
                        "Google Compute"
                    ]
                },
                "credentials": {
                    "type": "object",
                    "oneOf": [
                        {
                            "type": "object",
                            "additionalProperties": false,
                            "properties": {
                                "key": {
                                    "type": "string",
                                    "maxLength": 4096
                                }
                            }
                        },
                        {
                            "type": "object",
                            "required": [
                                "refresh_token"
                            ],
                            "additionalProperties": false,
                            "properties": {
                                "access_token": {
                                    "type": "string",
                                    "maxLength": 4096
                                },
                                "refresh_token": {
                                    "type": "string",
                                    "maxLength": 4096
                                }
                            }
                        }
                    ]
                },
                "deleted": {
                    "type": "string",
                    "maxLength": 2048,
                    "default": null
                },
                "email": {
                    "type": "string",
                    "maxLength": 2048
                },
                "icon": {
                    "type": "string",
                    "maxLength": 256,
                    "default": "images/platform/google.png"
                },
                "organization": {
                    "type": "string",
                    "maxLength": 256,
                    "description": "The name of the organization that owns this provider."
                },
                "project_id": {
                    "type": "string",
                    "maxLength": 2048
                },
                "schema": {
                    "type": "string",
                    "enum": [
                        "http://elasticbox.net/schemas/gce/provider"
                    ]
                },
                "state": {
                    "type": "string",
                    "default": "initializing",
                    "enum": [
                        "initializing",
                        "processing",
                        "ready",
                        "deleting",
                        "unavailable"
                    ]
                },
                "services": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "type": "object",
                        "oneOf": [
                            {
                                "$ref": "http://elasticbox.net/schemas/gce/compute/linux"
                            }
                        ]
                    }
                }
            }
        }
    ]
}

Script Box

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://elasticbox.net/schemas/boxes/script",
    "type": "object",
    "additionalProperties": false,
    "description": "Schema for a Script box",
    "allOf": [
        {
            "$ref": "http://elasticbox.net/schemas/object-base"
        },
        {
            "$ref": "http://elasticbox.net/schemas/shareable"
        },
        {
            "$ref": "http://elasticbox.net/schemas/versionable"
        },
        {
            "type": "object",
            "required": [
                "automatic_updates",
                "deleted",
                "organization",
                "requirements",
                "schema",
                "visibility"
            ],
            "properties": {
                "automatic_updates": {
                    "type": "string",
                    "default": "off",
                    "enum": [
                        "major",
                        "minor",
                        "patch",
                        "off"
                    ]
                },
                "deleted": {
                    "type": "string",
                    "maxLength": 2048,
                    "default": null
                },
                "events": {
                    "type": "object",
                    "default": {},
                    "properties": {
                        "configure": {
                            "$ref": "http://elasticbox.net/schemas/file-reference"
                        },
                        "dispose": {
                            "$ref": "http://elasticbox.net/schemas/file-reference"
                        },
                        "install": {
                            "$ref": "http://elasticbox.net/schemas/file-reference"
                        },
                        "post_dispose": {
                            "$ref": "http://elasticbox.net/schemas/file-reference"
                        },
                        "post_stop": {
                            "$ref": "http://elasticbox.net/schemas/file-reference"
                        },
                        "pre_configure": {
                            "$ref": "http://elasticbox.net/schemas/file-reference"
                        },
                        "pre_install": {
                            "$ref": "http://elasticbox.net/schemas/file-reference"
                        },
                        "pre_start": {
                            "$ref": "http://elasticbox.net/schemas/file-reference"
                        },
                        "start": {
                            "$ref": "http://elasticbox.net/schemas/file-reference"
                        },
                        "stop": {
                            "$ref": "http://elasticbox.net/schemas/file-reference"
                        }
                    }
                },
                "icon": {
                    "type": "string",
                    "maxLength": 256
                },
                "organization": {
                    "type": "string",
                    "maxLength": 256,
                    "description": "The name of the organization that owns this box."
                },
                "requirements": {
                    "type": "array",
                    "default": [],
                    "items": {"$ref": "http://elasticbox.net/schemas/name"}
                },
                "schema": {
                    "type": "string",
                    "enum": [
                        "http://elasticbox.net/schemas/boxes/script"
                    ]
                },
                "visibility": {
                    "type": "string",
                    "default": "workspace",
                    "enum": [
                        "public",
                        "workspace",
                        "organization"
                    ]
                },
                "tags": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "$ref": "http://elasticbox.net/schemas/name"
                    }
                },
                "variables": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "$ref": "http://elasticbox.net/schemas/variable"
                    }
                }
            }
        }
    ]
}

Policy Box

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://elasticbox.net/schemas/boxes/policy",
    "type": "object",
    "additionalProperties": false,
    "description": "Schema for a Policy box",
    "allOf": [
        {
            "$ref": "http://elasticbox.net/schemas/object-base"
        },
        {
            "$ref": "http://elasticbox.net/schemas/shareable"
        },
        {
            "$ref": "http://elasticbox.net/schemas/versionable"
        },
        {
            "type": "object",
            "required": [
                "automatic_updates",
                "claims",
                "deleted",
                "organization",
                "profile",
                "provider_id",
                "schema",
                "visibility"
            ],
            "properties": {
                "automatic_updates": {
                    "type": "string",
                    "default": "off",
                    "enum": [
                        "major",
                        "minor",
                        "patch",
                        "off"
                    ]
                },
                "deleted": {
                    "type": "string",
                    "maxLength": 2048,
                    "default": null
                },
                "icon": {
                    "type": "string",
                    "maxLength": 256
                },
                "organization": {
                    "type": "string",
                    "maxLength": 256,
                    "description": "The name of the organization that owns this box."
                },
                "profile": {
                    "type": "object",
                    "anyOf": [
                        {"$ref": "http://elasticbox.net/schemas/aws/ec2/profile"},
                        {"$ref": "http://elasticbox.net/schemas/azure/compute/linux/profile"},
                        {"$ref": "http://elasticbox.net/schemas/azure/compute/windows/profile"},
                        {"$ref": "http://elasticbox.net/schemas/cloudstack/compute/profile"},
                        {"$ref": "http://elasticbox.net/schemas/openstack/compute/profile"},
                        {"$ref": "http://elasticbox.net/schemas/vcloud/compute/profile"},
                        {"$ref": "http://elasticbox.net/schemas/vsphere/compute/profile"},
                        {"$ref": "http://elasticbox.net/schemas/gce/compute/profile"},
                        {"$ref": "http://elasticbox.net/schemas/test/compute/profile"},
                        {"$ref": "http://elasticbox.net/schemas/softlayer/compute/profile"},
                        {"$ref": "http://elasticbox.net/schemas/byoi/compute/profile"}
                    ],
                    "description": "The policy to define a new instance or the reference to an existing instance"
                },
                "provider_id": {
                    "$ref": "http://elasticbox.net/schemas/guid",
                    "description": "The provider ID"
                },
                "claims": {
                    "type": "array",
                    "default": [],
                    "items": {"$ref": "http://elasticbox.net/schemas/name"}
                },
                "schema": {
                    "type": "string",
                    "enum": [
                        "http://elasticbox.net/schemas/boxes/policy"
                    ]
                },
                "tags": {
                    "type": "array",
                    "default": [],
                    "items": {"$ref": "http://elasticbox.net/schemas/name"}
                },
                "variables": {
                    "type": "array",
                    "default": [],
                    "items": {"$ref": "http://elasticbox.net/schemas/variable"}
                },
                "visibility": {
                    "type": "string",
                    "default": "workspace",
                    "enum": [
                        "public",
                        "workspace",
                        "organization"
                    ]
                }
            }
        }
    ]
}

Container Box

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://elasticbox.net/schemas/boxes/docker",
    "type": "object",
    "additionalProperties": false,
    "description": "Schema for a docker box",
    "allOf": [
        {
            "$ref": "http://elasticbox.net/schemas/object-base"
        },
        {
            "$ref": "http://elasticbox.net/schemas/shareable"
        },
        {
            "$ref": "http://elasticbox.net/schemas/versionable"
        },
        {
            "type": "object",
            "required": [
                "automatic_updates",
                "deleted",
                "organization",
                "requirements",
                "schema",
                "visibility"
            ],
            "properties": {
                "automatic_updates": {
                    "type": "string",
                    "default": "off",
                    "enum": [
                        "major",
                        "minor",
                        "patch",
                        "off"
                    ]
                },
                "deleted": {
                    "type": "string",
                    "maxLength": 2048,
                    "default": null
                },
                "events": {
                    "type": "object",
                    "default": {},
                    "properties": {
                        "configure": {"$ref": "http://elasticbox.net/schemas/file-reference"},
                        "dispose": {"$ref": "http://elasticbox.net/schemas/file-reference"},
                        "install": {"$ref": "http://elasticbox.net/schemas/file-reference"},
                        "post_dispose": {"$ref": "http://elasticbox.net/schemas/file-reference"},
                        "post_stop": {"$ref": "http://elasticbox.net/schemas/file-reference"},
                        "pre_configure": {"$ref": "http://elasticbox.net/schemas/file-reference"},
                        "pre_install": {"$ref": "http://elasticbox.net/schemas/file-reference"},
                        "pre_start": {"$ref": "http://elasticbox.net/schemas/file-reference"},
                        "start": {"$ref": "http://elasticbox.net/schemas/file-reference"},
                        "stop": {"$ref": "http://elasticbox.net/schemas/file-reference"}
                    }
                },
                "icon": {
                    "type": "string",
                    "maxLength": 256
                },
                "organization": {
                    "type": "string",
                    "maxLength": 256,
                    "description": "The name of the organization that owns this box."
                },
                "requirements": {
                    "type": "array",
                    "default": [],
                    "items": {"$ref": "http://elasticbox.net/schemas/name"}
                },
                "schema": {
                    "type": "string",
                    "enum": ["http://elasticbox.net/schemas/boxes/docker"]
                },
                "variables": {
                    "type": "array",
                    "default": [],
                    "items": {"$ref": "http://elasticbox.net/schemas/variable"}
                },
                "visibility": {
                    "type": "string",
                    "default": "workspace",
                    "enum": [
                        "public",
                        "workspace",
                        "organization"
                    ]
                },
                "dockerfile": {
                    "$ref": "http://elasticbox.net/schemas/file-reference"
                }
            }
        }
    ]
}

CloudFormation Box

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://elasticbox.net/schemas/boxes/cloudformation",
    "type": "object",
    "additionalProperties": false,
    "description": "Schema for a Cloud Formation box",
    "allOf": [
        {
            "$ref": "http://elasticbox.net/schemas/object-base"
        },
        {
            "$ref": "http://elasticbox.net/schemas/shareable"
        },
        {
            "$ref": "http://elasticbox.net/schemas/versionable"
        },
        {
            "type": "object",
            "required": [
                "automatic_updates",
                "deleted",
                "organization",
                "requirements",
                "schema",
                "visibility",
                "type"
            ],
            "properties": {
                "automatic_updates": {
                    "type": "string",
                    "default": "off",
                    "enum": [
                        "major",
                        "minor",
                        "patch",
                        "off"
                    ]
                },
                "deleted": {
                    "type": "string",
                    "maxLength": 2048,
                    "default": null
                },
                "icon": {
                    "type": "string",
                    "maxLength": 256
                },
                "organization": {
                    "type": "string",
                    "maxLength": 256,
                    "description": "The name of the organization that owns this box."
                },
                "profile": {
                    "type": "object",
                    "anyOf": [
                        {
                            "$ref": "http://elasticbox.net/schemas/aws/cloudformation/profile"
                        }
                    ]
                },
                "provider_id": {
                    "$ref": "http://elasticbox.net/schemas/guid",
                    "description": "The provider ID"
                },
                "requirements": {
                    "type": "array",
                    "default": [],
                    "items": {"$ref": "http://elasticbox.net/schemas/name"}
                },
                "schema": {
                    "type": "string",
                    "enum": ["http://elasticbox.net/schemas/boxes/cloudformation"]
                },
                "tags": {
                    "type": "array",
                    "default": [],
                    "items": {"$ref": "http://elasticbox.net/schemas/name"}
                },
                "variables": {
                    "type": "array",
                    "default": [],
                    "items": {"$ref": "http://elasticbox.net/schemas/variable"}
                },
                "visibility": {
                    "type": "string",
                    "default": "workspace",
                    "enum": [
                        "public",
                        "workspace",
                        "organization"
                    ]
                },
                "type": {
                    "type": "string",
                    "default": "CloudFormation Service",
                    "enum": [
                         "CloudFormation Service"
                    ]
                },
                "template": {
                    "$ref": "http://elasticbox.net/schemas/file-reference"
                }
            }
        }
    ]
}

Deploy Instance Request

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://elasticbox.net/schemas/deploy-instance-request",
    "type": "object",
    "required": [
        "automatic_updates",
        "box",
        "name",
        "schema"
    ],
    "additionalProperties": false,
    "description": "Schema for a deployment instance request",
    "properties": {
        "automatic_updates": {
            "type": "string",
            "default": "off",
            "enum": [
                "major",
                "minor",
                "patch",
                "off"
            ]
        },
        "box": {
            "type": "object",
            "required": [
                "id",
                "variables"
            ],
            "additionalProperties": false,
            "properties": {
                "id": {
                    "$ref": "http://elasticbox.net/schemas/guid"
                },
                "variables": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "$ref": "http://elasticbox.net/schemas/variable"
                    }
                }
            }
        },
        "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 30
        },
        "instance_tags": {
            "type": "array",
            "default": [],
            "items": {"$ref": "http://elasticbox.net/schemas/name"}
        },
        "lease": {
            "type": "object",
            "required": [
                "expire",
                "operation"
            ],
            "additionalProperties": false,
            "properties": {
                "expire": {
                    "type": "string",
                    "maxLength": 2048
                },
                "operation": {
                    "type": "string",
                    "enum": [
                        "shutdown",
                        "terminate"
                    ]
                }
            }
        },
        "owner": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64
        },
        "ipv4_address": {
            "type": "string",
            "maxLength": 15
        },
        "policy_box": {
            "type": "object",
            "required": [
                "id",
                "variables"
            ],
            "additionalProperties": false,
            "properties": {
                "id": {
                    "$ref": "http://elasticbox.net/schemas/guid"
                },
                "variables": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "$ref": "http://elasticbox.net/schemas/variable"
                    }
                }
            }
        },
        "schema": {
            "type": "string",
            "enum": [
                "http://elasticbox.net/schemas/deploy-instance-request"
            ]
        }
    }
}

Instance

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://elasticbox.net/schemas/instance",
    "type": "object",
    "additionalProperties": false,
    "allOf": [
        {
            "$ref": "http://elasticbox.net/schemas/object-timestamp"
        },
        {
            "$ref": "http://elasticbox.net/schemas/shareable"
        },
        {
            "required": [
                "automatic_updates",
                "box",
                "boxes",
                "deleted",
                "id",
                "name",
                "operation",
                "schema",
                "service",
                "state",
                "tags"
            ],
            "properties": {
                "id": {
                    "type": "string",
                    "maxLength": 36
                },
                "automatic_updates": {
                    "type": "string",
                    "default": "off",
                    "enum": [
                      "major",
                      "minor",
                      "patch",
                      "off"
                    ]
                },
                "box": {
                    "$ref": "http://elasticbox.net/schemas/guid"
                },
                "deleted": {
                    "type": "string",
                    "maxLength": 2048,
                    "default": null
                },
                "policy_box": {
                    "type": "object",
                    "anyOf": [
                        {
                            "$ref": "http://elasticbox.net/schemas/boxes/policy"
                        },
                        {
                            "$ref": "http://elasticbox.net/schemas/boxes/cloudformation"
                        }
                    ]
                },
                "icon": {
                    "type": "string",
                    "maxLength": 256
                },
                "lease": {
                    "type": "object",
                    "required": [
                        "expire",
                        "operation",
                        "released"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "expire": {
                            "type": "string",
                            "maxLength": 2048
                        },
                        "operation": {
                            "type": "string",
                            "enum": [
                                "shutdown",
                                "terminate"
                            ]
                        },
                        "released": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                },
                "name": {
                    "$ref": "http://elasticbox.net/schemas/name"
                },
                "operation": {
                    "type": "string",
                    "enum": [
                        "deploy",
                        "shutdown",
                        "shutdown_service",
                        "poweron",
                        "reinstall",
                        "reconfigure",
                        "terminate",
                        "terminate_service",
                        "snapshot"
                    ]
                },
                "schema": {
                    "type": "string",
                    "enum": [
                        "http://elasticbox.net/schemas/instance"
                    ]
                },
                "service": {
                    "type": "object",
                    "required": [
                        "id",
                        "machines"
                    ],
                    "additionalProperties": false,
                    "properties": {
                        "id": {
                            "type": "string",
                            "maxLength": 30
                        },
                        "type": {
                            "$ref": "http://elasticbox.net/schemas/service-type"
                        },
                        "machines": {
                            "type": "array",
                            "default": [],
                            "items": {
                                "$ref": "#/definitions/instance-machine"
                            }
                        }
                    }
                },
                "state": {
                    "type": "string",
                    "enum": [
                        "processing",
                        "done",
                        "unavailable"
                    ]
                },
                "boxes": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "$ref": "http://elasticbox.net/schemas/box"
                    }
                },
                "tags": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "$ref": "http://elasticbox.net/schemas/name"
                    }
                },
                "variables": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "$ref": "http://elasticbox.net/schemas/variable"
                    }
                }
            }
        }
    ],
    "definitions": {
        "instance-machine": {
            "type": "object",
            "required": [
                "name",
                "state",
                "workflow"
            ],
            "additionalProperties": false,
            "properties": {
                "name": {
                    "$ref": "http://elasticbox.net/schemas/name"
                },
                "state": {
                    "type": "string",
                    "enum": [
                        "processing",
                        "done",
                        "unavailable"
                    ]
                },
                "workflow": {
                    "type": "array",
                    "default": [],
                    "items": {
                        "type": "object",
                        "required": [
                            "event"
                        ],
                        "additionalProperties": false,
                        "properties": {
                            "box": {
                                "type": "string",
                                "pattern": "^[a-zA-Z0-9_\\.]*$"
                            },
                            "event": {
                                "type": "string",
                                "maxLength": 256
                            },
                            "script": {
                                "type": "string",
                                "maxLength": 512
                            }
                        }
                    }
                }
            }
        }
    }
}

Version

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "id": "http://elasticbox.net/schemas//versionable",
    "type": "object",
    "properties": {
        "draft_from": {
            "$ref": "http://elasticbox.net/schemas/guid"
        },
        "version": {
            "type": "object",
            "required": [
                "box",
                "description",
                "number"
            ],
            "properties": {
                "box": {
                    "$ref": "http://elasticbox.net/schemas/guid"
                },
                "description": {
                    "type": "string",
                    "maxLength": 2048
                },
                "number": {
                    "type": "object",
                    "required": [
                        "major",
                        "minor",
                        "patch"
                    ],
                    "properties": {
                        "major": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "minor": {
                            "type": "integer",
                            "minimum": 0
                        },
                        "patch": {
                            "type": "integer",
                            "minimum": 0
                        }
                    }
                },
                "workspace": {
                    "type": "string",
                    "maxLength": 64
                }
            }
        }
    }
}

Contacting Cloud Application Manager Support

We’re sorry you’re having an issue in Cloud Application Manager. Please review the troubleshooting tips, or contact Cloud Application Manager support with details and screenshots where possible.

For issues related to API calls, send the request body along with details related to the issue.

In the case of a box error, share the box in the workspace that your organization and Cloud Application Manager can access and attach the logs.

  • Linux: SSH and locate the log at /var/log/elasticbox/elasticbox-agent.log
  • Windows: RDP into the instance to locate the log at ProgramDataElasticBoxLogselasticbox-agent.log

Providers API

Manage and perform provider actions.

Manage Providers

Ressource Description
POST /services/providers Creates a new provider account in Cloud Application Manager and gets the status of the provider.
GET /services/providers Gets the list of providers.
GET /services/providers/{provider_id} Fetches an existing provider.
PUT /services/providers/{provider_id} Updates an existing provider.
DELETE /services/providers/{provider_id} Deletes an existing provider.

Provider Operations

Ressource Description
PUT /services/providers/{provider_id}/sync Syncs an existing provider.
GET /services/providers/{provider_id}/logs Gets the logs of a provider.
GET /services/providers/{provider_id}/unregisted-instances Gets the unregistered instances of a provider.
POST /services/providers/{provider_id}/images Adds a new machine image to a provider.
DELETE /services/providers/{provider_id}/images/{machine_image_id} Updates an existing provider.

POST /services/providers

Creates a new provider account in Cloud Application Manager and gets the status of the provider.

Normal Code

  • 202 accepted

Error Codes

Request Headers

content-type:application/json
Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0

Request parameters for all providers

Parameter Type Description
icon chaîne Specify an icon URI for the provider account.
type chaîne Required. Specify the account type as one of the following: Amazon Web Services, Rackspace, Openstack, VMware vSphere, Google Compute, Microsoft Azure, Cloudstack, SoftLayer.
description chaîne Describe the services from the provider.
schema chaîne Required. Provide the schema for the request.
nom chaîne Required. Give the provider account a name in Cloud Application Manager.
owner chaîne Specify the user in Cloud Application Manager who owns the provider account.

Amazon Web Services request parameters

Parameter Type Description
credentials objet Required. Contains the credential object, which is either the AWS role ARN name if using Cloud Application Manager as a SaaS or the key and secret if using Cloud Application Manager as an appliance.

Amazon Web Services request body

{
   "icon": "images/platform/aws.png",
   "type": "Amazon Web Services",
   "description": "Manage EC2, ECS and Cloudformation instances",
   "schema": "http://elasticbox.net/schemas/aws/provider",
   "name": "example account",
   "credentials": {
      "role": "role_ARN_that_gives_Cloud_Application_Manager_access"
   },
   "owner": "mrina"
}

Amazon Web Services Gov request parameters

Parameter Type Description
credentials objet Required. Contains the credential object, which is either the AWS role ARN name if using Cloud Application Manager as a SaaS or the key and secret if using Cloud Application Manager as an appliance.

Amazon Web Services Gov request body

{
  "icon": "images/platform/govcloud.png",
  "type": "Amazon Web Services GovCloud",
  "description": "Manage compute services in an isolated ITAR compliant AWS region",
  "schema": "http://elasticbox.net/schemas/aws/provider",
  "name": "AWSGovCloud",
  "credentials": {
    "key": "_the_key",
    "secret": "_the_secret"
  },
  "owner": "operations"
}

Rackspace and OpenStack request parameters

Parameter Type Description
identity_url chaîne Required. Specify the identity service endpoint.
project chaîne Required. Specify the project ID for Rackspace or the tenant for OpenStack.
username chaîne Required. Specify the username.
password chaîne Required. Specify the password.

Rackspace request body

{
   "icon": "images/platform/rackspace.png",
   "type": "Rackspace",
   "description": "Manage cloud hosting and Linux machines",
   "schema": "http://elasticbox.net/schemas/openstack/provider",
   "identity_url": "https://identity.api.rackspacecloud.com/v2.0",
   "name": "example rackspace",
   "project": "your_project_ID",
   "username": "your_Rackspace_username",
   "password": "your_Rackspace_password",
   "owner": "mrina"
}

OpenStack request body

{
   "icon": "images/platform/openstack.png",
   "type": "Openstack",
   "description": "Manage cloud hosting, Linux and Windows machines",
   "schema": "http://elasticbox.net/schemas/openstack/provider",
   "name": "example openstack",
   "identity_url": "http://openstack-26.cam.ctl.io:5000/v2.0",
   "project": "your_OpenStack_tenant",
   "username": "your_OpenStack_username",
   "password": "your_OpenStack_password",
   "owner": "mrina"
}

VSphere request parameters

Parameter Type Description
username chaîne Required. Specify a vCenter username.
secret chaîne Required. Specify the user’s password.
endpoint chaîne Required. Specify the vCenter server URL.

VSphere request body

{
   "icon": "images/platform/vsphere.png",
   "type": "VMware vSphere",
   "description": "Manage cloud hosting, Linux and Windows machines",
   "schema": "http://elasticbox.net/schemas/vsphere/provider",
   "name": "example vcenter",
   "username": "your_Vspherer_username",
   "secret": "your_Vsphere_user_password",
   "endpoint": "your_vCenter_server_URL",
   "owner": "mrina"
}

VCloud request parameters

Parameter Type Description
username chaîne Required. Specify a vCenter username.
password chaîne Required. Specify the user’s password.
url chaîne Required. Specify the vCenter server URL.
organization chaîne Required. Organization.

VCloud request body

{
  "icon": "images/platform/vcloud.png",
  "type": "VMware vCloud Director",
  "description": "Manage cloud hosting, Linux and Windows machines",
  "schema": "http://elasticbox.net/schemas/vcloud/provider",
  "name": "VMwareVCloudProvider",
  "url": "https://v-cloud.cam.ctl.io",
  "vorg": "system",
  "username": "_the_username",
  "password": "_the_password",
  "owner": "operations"
}

Google Cloud request parameters

Parameter Type Description
project_id chaîne Required. Specify a project ID in Google Cloud that has billing and the Google Compute Engine API enabled.
courriel chaîne Required. Specify your Gmail account associated with Google Cloud.
credentials objet Required. Specify either the refresh_token object or the key. You can get the refresh_token from Google OAuth 2.0 to allow Cloud Application Manager to make API requests on your behalf. Or you can provide the JSON key for the project service account.

Google Cloud request body

{
   "icon": "images/platform/google.png",
   "type": "Google Compute",
   "description": "Manage cloud hosting and Linux machines",
   "name": "example google cloud account",
   "project_id": "your_GoogleCloud_projectID",
   "email": "your_gmailaccount_for_GoogleCloud",
   "credentials": {
      "refresh_token": "Google_OAuth_2.0_refresh_token"
   },
   "schema": "http://elasticbox.net/schemas/gce/provider",
   "owner": "mrina"
}

Azure request parameter

To add an Azure subscription in Cloud Application Manager, you first have to upload the Cloud Application Manager management certificate to your subscription in Azure.

Parameter Type Description
subscription chaîne Required. Specify the Azure subscription ID.

Azure request body

{
   "icon": "images/platform/azure-storage.png",
   "type": "Microsoft Azure",
   "description": "Manage compute services for Windows and Linux machines.",
   "schema": "http://elasticbox.net/schemas/azure/provider",
   "name": "example azure",
   "subscription_id": "your_Azure_subscription_ID",
   "owner": "mrina"
}

CloudStack request parameters

Parameter Type Description
url chaîne Required. Specify the API endpoint to the CloudStack management server.
api_key chaîne Required. Specify the API key for the CloudStack user account.
secret_key chaîne Required. Specify the API secret for the CloudStack user account.

CloudStack request body

{
   "icon": "images/platform/cloudstack.png",
   "type": "Cloudstack",
   "description": "Manage cloud hosting, Linux and Windows machines",
   "schema": "http://elasticbox.net/schemas/cloudstack/provider",
   "name": "example CloudStack",
   "url": "CloudStack_management_server_endpoint",
   "api_key": "CloudStack_API_key",
   "secret_key": "CloudStack_secret_key",
   "owner": "mrina"
}

SoftLayer request parameters

Parameter Type Description
username chaîne Required. Specify a SoftLayer account username.
api_key chaîne Required. Specify the API key for the SoftLayer user.

SoftLayer request body

{
   "icon": "images/platform/softlayer.png",
   "type": "SoftLayer",
   "description": "Manage compute services for Windows and Linux machines.",
   "schema": "http://elasticbox.net/schemas/softlayer/provider",
   "name": "example softlayer",
   "username": "your_SoftLayer_username",
   "api_key": "SoftLayer_API_key_for_username",
   "owner": "mrina"
}

Response parameters for all providers

Parameter Type Description
updated chaîne Returns the date the provider was updated.
description chaîne Returns the description for the provider.
deleted objet Identifies whether the provider is deleted.
services array Returns the available services from the provider.
members array Returns users with whom the provider is shared.
owner chaîne Returns the provider account owner in Cloud Application Manager.
id chaîne Returns the ID of the provider account in Cloud Application Manager.
icon chaîne Returns the icon used for the provider account.
nom chaîne Returns the name used to identify the provider account in Cloud Application Manager.
created chaîne Returns the date that the provider was added.
uri chaîne Returns the unique resource identifier path to the provider account.
admin_boxes chaîne Lists the admin boxes attached to the provider.
organization chaîne Identifies the name of the organization.
type chaîne Identifies the provider as one of the following: Amazon Web Services, Rackspace, Openstack, VMware vSphere, Google Compute, Microsoft Azure, Cloudstack, SoftLayer.
schema chaîne Returns the schema URL.

AWS response parameters

Parameter Type Description
credentials objet Returns the Amazon Web Services role ARN if using Cloud Application Manager as a SaaS or identifies the key and secret if using Cloud Application Manager as an appliance.

AWS response body

{
   "updated": "2015-01-05 18:36:26.227970",
   "description": "Manage EC2, ECS and Cloudformation instances",
   "deleted": null,
   "services": [],
   "members": [],
   "owner": "mrina",
   "credentials": {
      "role": "your_ARN_role_that_allows_Cloud_Application_Manager_access"
   },
   "id": "aefc3f24-74af-414d-98ae-d6ee05997610",
   "icon": "images/platform/aws.png",
   "name": "example account",
   "created": "2015-01-05 18:36:26.227970",
   "uri": "/services/providers/aefc3f24-74af-414d-98ae-d6ee05997610",
   "state": "initializing",
   "admin_boxes": [],
   "organization": "elasticbox",
   "type": "Amazon Web Services",
   "schema": "http://elasticbox.net/schemas/aws/provider"
}

Rackspace and OpenStack response parameters

Parameter Type Description
username chaîne Returns the username.
password chaîne Masks the password for the provider account.
project chaîne Returns the Rackspace project ID or the OpenStack tenant.
identity_url chaîne Returns the OpenStack identity service endpoint.

Rackspace response example

{
  "username": "_the_username",
  "updated": "2015-10-30 12:16:30.836398",
  "password": "_the_password",
  "description": "Manage cloud hosting and Linux machines",
  "created": "2015-10-30 12:16:30.836398",
  "deleted": null,
  "type": "Rackspace",
  "uri": "/services/providers/c6ade25c-cc46-4271-934d-55c75dba821a",
  "name": "RackSpace",
  "project": "937535",
  "services": [

  ],
  "state": "initializing",
  "admin_boxes": [

  ],
  "members": [

  ],
  "owner": "operations",
  "organization": "elasticbox",
  "icon": "images/platform/rackspace.png",
  "identity_url": "https://identity.api.rackspacecloud.com/v2.0",
  "id": "c6ade25c-cc46-4271-934d-55c75dba821a",
  "schema": "http://elasticbox.net/schemas/openstack/provider"
}

Openstack response example

{
  "username": "_the_username",
  "updated": "2015-10-30 12:26:14.331420",
  "password": "_the_password",
  "description": "Manage cloud hosting, Linux and Windows machines",
  "created": "2015-10-30 12:26:14.331420",
  "deleted": null,
  "identity_url": "http://openstack-36.cam.ctl.io:5000/v2.0",
  "uri": "/services/providers/57106d2a-ab5d-486a-988f-31a729a0c29d",
  "name": "OpenStackProvider",
  "project": "admin",
  "services": [

  ],
  "state": "initializing",
  "admin_boxes": [

  ],
  "members": [

  ],
  "owner": "operations",
  "organization": "elasticbox",
  "icon": "images/platform/openstack.png",
  "type": "Openstack",
  "id": "57106d2a-ab5d-486a-988f-31a729a0c29d",
  "schema": "http://elasticbox.net/schemas/openstack/provider"
}

VSphere response parameters

Parameter Type Description
username chaîne Returns the vCenter username.
secret chaîne Masks the user’s password.
endpoint chaîne Returns the vCenter server URL.

VSphere response example

{
  "username": "_the_username",
  "updated": "2015-10-30 12:51:53.729679",
  "endpoint": "https://10.0.128.2",
  "description": "Manage cloud hosting, Linux and Windows machines",
  "state": "initializing",
  "deleted": null,
  "created": "2015-10-30 12:51:53.729679",
  "uri": "/services/providers/3afc1c99-dd66-436a-ace4-33979dd5f5ca",
  "name": "VMWareVSphereProvider",
  "services": [

  ],
  "secret": "_the_secret",
  "admin_boxes": [

  ],
  "members": [

  ],
  "owner": "operations",
  "organization": "elasticbox",
  "icon": "images/platform/vsphere.png",
  "type": "VMware vSphere",
  "id": "3afc1c99-dd66-436a-ace4-33979dd5f5ca",
  "schema": "http://elasticbox.net/schemas/vsphere/provider"
}

Google Cloud response parameters

Parameter Type Description
project_id chaîne Returns the project ID in Google Cloud that the provider account uses.
courriel chaîne Returns the Gmail account associated with Google Cloud for the provider account.
credentials objet Returns either the access_token and refresh_token objects or the key. Returns a key if you provided a JSON key for the project service account.

Google Cloud response example

{
  "updated": "2015-10-30 12:34:09.062710",
  "description": "Manage cloud hosting and Linux machines",
  "icon": "images/platform/google.png",
  "created": "2015-10-30 12:34:09.062710",
  "deleted": null,
  "id": "d86e3bfe-1edc-45b4-a03b-28d1e2b7eee2",
  "uri": "/services/providers/d86e3bfe-1edc-45b4-a03b-28d1e2b7eee2",
  "name": "GoogleComputeProvider",
  "services": [

  ],
  "state": "initializing",
  "admin_boxes": [

  ],
  "members": [

  ],
  "organization": "elasticbox",
  "owner": "operations",
  "credentials": {
    "key": "_the_key"
  },
  "project_id": "_project_id",
  "type": "Google Compute",
  "email": "email@company.com",
  "schema": "http://elasticbox.net/schemas/gce/provider"
}

Azure response parameters

Parameter Type Description
subscription_id chaîne Returns the Azure subscription ID that the provider account uses.

Azure response example

{
  "updated": "2015-10-30 12:49:38.014690",
  "description": "Manage compute services for Windows and Linux machines",
  "created": "2015-10-30 12:49:38.014690",
  "deleted": null,
  "uri": "/services/providers/57b41251-43fd-4a18-9182-c71db30f9035",
  "name": "MicrosoftAzureServiceProvider",
  "services": [

  ],
  "state": "initializing",
  "admin_boxes": [

  ],
  "members": [

  ],
  "owner": "operations",
  "organization": "elasticbox",
  "subscription_id": "_the_subscription_id",
  "icon": "images/platform/azure-storage.png",
  "type": "Microsoft Azure",
  "id": "57b41251-43fd-4a18-9182-c71db30f9035",
  "schema": "http://elasticbox.net/schemas/azure/provider"
}

CloudStack response parameters

Parameter Type Description
url chaîne Returns the API endpoint to the CloudStack management server.
api_key chaîne Returns the API key for the CloudStack user account.
secret_key chaîne Returns the API secret for the CloudStack user account.

CloudStack response example

{
  "updated": "2015-10-30 12:28:22.315749",
  "api_key": "the_api_key",
  "description": "Manage cloud hosting, Linux and Windows machines",
  "created": "2015-10-30 12:28:22.315749",
  "url": "http://10.0.128.21:8080/client/api",
  "uri": "/services/providers/e50e4612-74a5-40b9-8aa0-b82631782c10",
  "name": "CloudStack",
  "deleted": null,
  "state": "initializing",
  "admin_boxes": [

  ],
  "members": [

  ],
  "organization": "elasticbox",
  "owner": "operations",
  "services": [

  ],
  "secret_key": "_the_secret_key",
  "icon": "images/platform/cloudstack.png",
  "type": "Cloudstack",
  "id": "e50e4612-74a5-40b9-8aa0-b82631782c10",
  "schema": "http://elasticbox.net/schemas/cloudstack/provider"
}

SoftLayer response parameters

Parameter Type Description
username chaîne Returns the SoftLayer username the provider account uses.
api_key chaîne Returns the API key for the SoftLayer user.

SoftLayer response example

{
  "username": "_the_username",
  "updated": "2015-10-30 12:22:57.519720",
  "api_key": "_the_apikey",
  "description": "Manage compute services for Windows and Linux machines",
  "created": "2015-10-30 12:22:57.519720",
  "deleted": null,
  "uri": "/services/providers/8a820dc5-c21e-434f-9ca7-03434d066bd6",
  "name": "SoftlayerProvider",
  "services": [

  ],
  "state": "initializing",
  "admin_boxes": [

  ],
  "members": [

  ],
  "owner": "operations",
  "organization": "elasticbox",
  "icon": "images/platform/softlayer.png",
  "type": "SoftLayer",
  "id": "8a820dc5-c21e-434f-9ca7-03434d066bd6",
  "schema": "http://elasticbox.net/schemas/softlayer/provider"
}

GET /services/providers

Gets available providers from the personal workspace of the authenticated user.

GET /services/providers

  • 200

Error Response Codes

  • Bad Request (400)

Requête

Headers:

Content-Type: application/json
Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0

Response parameters

Parameter Type Description
updated chaîne Date of the last update.
description chaîne Provider description.
created chaîne Creation date.
uri chaîne Provider uri.
nom chaîne Provider name.
services array List of services associated to the provider, each service has a name.
state chaîne Provider state, there are five possible states: initializing , processing , ready , deleting or unavailable.
members array List of members with access to the provider.
owner chaîne Provider owner.
type chaîne Provider type, there are the available providers: Amazon Web Services (AWS), VShpere, VCloud, RackSpace, Openstack, Google Compute, Azure, CloudStack, Softlayer, AWS Gov.
id chaîne Provider unique identificator.
icon chaîne Provider Icon uri.
schema chaîne The uri schema of the right provider.
[
    {
        "updated": "2015-10-30 12:28:38.312157",
        "description": "Manage cloud hosting, Linux and Windows machines",
        "icon": "images/platform/cloudstack.png",
        "created": "2015-10-30 12:28:22.315749",
        "uri": "/services/providers/e50e4612-74a5-40b9-8aa0-b82631782c10",
        "name": "CloudStack",
        "services": [],
        "state": "unavailable",
        "members": [],
        "owner": "operations",
        "type": "Cloudstack",
        "id": "e50e4612-74a5-40b9-8aa0-b82631782c10",
        "schema": "http://elasticbox.net/schemas/cloudstack/provider"
    },
    {
        "schema": "http://elasticbox.net/schemas/vsphere/provider",
        "updated": "2015-10-30 12:25:42.135998",
        "description": "Manage cloud hosting, Linux and Windows machines",
        "created": "2015-10-09 07:35:00.273473",
        "uri": "/services/providers/cac26e4c-16f8-46ad-83ae-52a2b1ba4fca",
        "name": "vSphere",
        "owner": "operations",
        "state": "ready",
        "members": [],
        "services": [
            {
                "name": "Linux Compute"
            },
            {
                "name": "Windows Compute"
            }
        ],
        "type": "VMware vSphere",
        "id": "cac26e4c-16f8-46ad-83ae-52a2b1ba4fca",
        "icon": "images/platform/vsphere.png"
    },
    {
        "updated": "2015-10-30 12:18:45.899110",
        "description": "Manage cloud hosting and Linux machines",
        "icon": "images/platform/rackspace.png",
        "created": "2015-10-30 12:16:30.836398",
        "uri": "/services/providers/c6ade25c-cc46-4271-934d-55c75dba821a",
        "name": "RackSpace",
        "services": [
            {
                "locations": [
                    {},
                    {},
                    {},
                    {}
                ],
                "name": "Linux Compute"
            }
        ],
        "state": "ready",
        "members": [],
        "owner": "operations",
        "type": "Rackspace",
        "id": "c6ade25c-cc46-4271-934d-55c75dba821a",
        "schema": "http://elasticbox.net/schemas/openstack/provider"
    },
    {
        "schema": "http://elasticbox.net/schemas/softlayer/provider",
        "updated": "2015-10-30 12:23:01.133330",
        "description": "Manage compute services for Windows and Linux machines",
        "created": "2015-10-30 12:22:57.519720",
        "uri": "/services/providers/8a820dc5-c21e-434f-9ca7-03434d066bd6",
        "name": "SoftlayerProvider",
        "services": [
            {
                "name": "Linux Compute"
            },
            {
                "name": "Windows Compute"
            }
        ],
        "state": "ready",
        "members": [],
        "owner": "operations",
        "type": "SoftLayer",
        "id": "8a820dc5-c21e-434f-9ca7-03434d066bd6",
        "icon": "images/platform/softlayer.png"
    },
    {
        "updated": "2015-10-30 12:26:23.841387",
        "description": "Manage cloud hosting, Linux and Windows machines",
        "icon": "images/platform/openstack.png",
        "created": "2015-10-30 12:26:14.331420",
        "uri": "/services/providers/57106d2a-ab5d-486a-988f-31a729a0c29d",
        "name": "OpenStackProvider",
        "services": [
            {
                "locations": [
                    {}
                ],
                "name": "Linux Compute"
            },
            {
                "locations": [
                    {}
                ],
                "name": "Windows Compute"
            }
        ],
        "state": "ready",
        "members": [],
        "owner": "operations",
        "type": "Openstack",
        "id": "57106d2a-ab5d-486a-988f-31a729a0c29d",
        "schema": "http://elasticbox.net/schemas/openstack/provider"
    },
    {
        "schema": "http://elasticbox.net/schemas/dimension-data/provider",
        "updated": "2015-10-30 12:58:20.228258",
        "description": "Manage compute services in DD",
        "created": "2015-10-30 12:58:19.078758",
        "uri": "/services/providers/052211ae-096a-44e7-b88c-27d8dcac3971",
        "name": "DimensionDataProvider",
        "services": [
            {
                "locations": [],
                "name": "Linux Compute"
            },
            {
                "locations": [],
                "name": "Windows Compute"
            }
        ],
        "state": "unavailable",
        "members": [],
        "owner": "operations",
        "type": "Dimension Data",
        "id": "052211ae-096a-44e7-b88c-27d8dcac3971",
        "icon": "images/platform/dimension-data.png"
    },
    {
        "schema": "http://elasticbox.net/schemas/gce/provider",
        "updated": "2015-10-30 12:39:06.518493",
        "description": "Manage cloud hosting and Linux machines",
        "created": "2015-10-30 12:34:09.062710",
        "uri": "/services/providers/d86e3bfe-1edc-45b4-a03b-28d1e2b7eee2",
        "name": "GoogleComputeProvider",
        "owner": "operations",
        "state": "ready",
        "members": [],
        "services": [
            {
                "name": "Linux Compute"
            }
        ],
        "type": "Google Compute",
        "id": "d86e3bfe-1edc-45b4-a03b-28d1e2b7eee2",
        "icon": "images/platform/google.png"
    },
    {
        "schema": "http://elasticbox.net/schemas/vsphere/provider",
        "updated": "2015-10-30 12:52:48.017525",
        "description": "Manage cloud hosting, Linux and Windows machines",
        "created": "2015-10-30 12:51:53.729679",
        "uri": "/services/providers/3afc1c99-dd66-436a-ace4-33979dd5f5ca",
        "name": "VMWareVSphereProvider",
        "services": [
            {
                "name": "Linux Compute"
            },
            {
                "name": "Windows Compute"
            }
        ],
        "state": "ready",
        "members": [],
        "owner": "operations",
        "type": "VMware vSphere",
        "id": "3afc1c99-dd66-436a-ace4-33979dd5f5ca",
        "icon": "images/platform/vsphere.png"
    },
    {
        "updated": "2015-10-27 20:54:28.739422",
        "description": "Manage EC2, ECS and Cloudformation instances",
        "icon": "images/platform/aws.png",
        "created": "2015-10-27 16:25:58.448390",
        "uri": "/services/providers/7e841966-1dec-4460-a981-1db4e1eec10c",
        "name": "AWSProvider",
        "owner": "operations",
        "state": "ready",
        "members": [],
        "services": [
            {
                "locations": [
                    {},
                    {},
                    {},
                    {},
                    {},
                    {},
                    {},
                    {},
                    {}
                ],
                "name": "CloudFormation Service"
            },
            {
                "name": "ECS Service",
                "locations": [
                    {
                        "clusters": []
                    },
                    {},
                    {
                        "clusters": []
                    },
                    {},
                    {
                        "clusters": []
                    },
                    {},
                    {
                        "clusters": [
                            {
                                "name": "scenarios-cluster",
                                "arn": "arn:aws:ecs:us-east-1:729190825118:cluster/scenarios-cluster"
                            }
                        ]
                    },
                    {
                        "clusters": []
                    },
                    {
                        "clusters": []
                    }
                ]
            },
            {
                "name": "Linux Compute",
                "locations": [
                    {},
                    {},
                    {},
                    {},
                    {},
                    {},
                    {},
                    {},
                    {}
                ]
            },
            {
                "name": "Windows Compute",
                "locations": [
                    {},
                    {},
                    {},
                    {},
                    {},
                    {},
                    {},
                    {},
                    {}
                ]
            }
        ],
        "type": "Amazon Web Services",
        "id": "7e841966-1dec-4460-a981-1db4e1eec10c",
        "schema": "http://elasticbox.net/schemas/aws/provider"
    },
    {
        "schema": "http://elasticbox.net/schemas/azure/provider",
        "updated": "2015-10-30 12:49:46.850182",
        "description": "Manage compute services for Windows and Linux machines",
        "created": "2015-10-30 12:49:38.014690",
        "uri": "/services/providers/57b41251-43fd-4a18-9182-c71db30f9035",
        "name": "MicrosoftAzureServiceProvider",
        "services": [
            {
                "name": "Linux Compute"
            },
            {
                "name": "Windows Compute"
            }
        ],
        "state": "ready",
        "members": [],
        "owner": "operations",
        "type": "Microsoft Azure",
        "id": "57b41251-43fd-4a18-9182-c71db30f9035",
        "icon": "images/platform/azure-storage.png"
    },
    {
        "updated": "2015-10-30 12:54:50.566266",
        "description": "Manage cloud hosting, Linux and Windows machines",
        "icon": "images/platform/vcloud.png",
        "created": "2015-10-30 12:53:55.767875",
        "uri": "/services/providers/51cf6ea7-1edc-42b7-ae96-f7a304060188",
        "name": "VMwareVCloudProvider",
        "services": [
            {
                "name": "Linux Compute"
            },
            {
                "name": "Windows Compute"
            }
        ],
        "state": "ready",
        "members": [],
        "owner": "operations",
        "type": "VMware vCloud Director",
        "id": "51cf6ea7-1edc-42b7-ae96-f7a304060188",
        "schema": "http://elasticbox.net/schemas/vcloud/provider"
    },
    {
        "schema": "http://elasticbox.net/schemas/aws/provider",
        "updated": "2015-10-30 13:00:29.227885",
        "description": "Manage compute services in an isolated ITAR compliant AWS region",
        "created": "2015-10-30 13:00:24.039492",
        "uri": "/services/providers/b975319b-d5c5-4f8b-8077-0e78a0240efa",
        "name": "AWSGovCloud",
        "services": [
            {
                "locations": [
                    {}
                ],
                "name": "CloudFormation Service"
            },
            {
                "name": "Linux Compute",
                "locations": [
                    {}
                ]
            },
            {
                "name": "Windows Compute",
                "locations": [
                    {}
                ]
            }
        ],
        "state": "ready",
        "members": [],
        "owner": "operations",
        "type": "Amazon Web Services GovCloud",
        "id": "b975319b-d5c5-4f8b-8077-0e78a0240efa",
        "icon": "images/platform/govcloud.png"
    }
]

GET /services/providers/{provider_id}

Fetches an existing provider when you give the provider ID.

Normal Response Codes

  • 202

Error Response Codes

  • Forbidden (403)
  • Not Found (404)

Requête

Headers:

Content-Type: application/json
Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0

Response parameters

Parameter Type Description
updated chaîne Date of the last update.
description chaîne Provider description.
created chaîne Creation date.
uri chaîne Provider uri.
nom chaîne Provider name.
services array List of services associated to the provider, each service has a name.
state chaîne Provider state, there are five possible states: initializing , processing , ready , deleting or unavailable.
members array List of members with access to the provider.
owner chaîne Provider owner.
type chaîne Provider type, there are the available providers: Amazon Web Services (AWS), VShpere, VCloud, RackSpace, Openstack, Google Compute, Azure, CloudStack, Softlayer, AWS Gov.
id chaîne Provider unique identificator.
schema chaîne The provider type schema uri.
icon chaîne Provider Icon uri.
{
   "updated":"2014-03-26 14:03:41.783045",
   "description":"Manage EC2, ECS and Cloudformation instances",
   "created":"2014-03-26 14:03:30.192871",
   "uri":"/services/providers/8c501fe3-54d7-49eb-b5d3-05016becabe3",
   "state":"ready",
   "name":"MyAmazon",
   "members":[

   ],
   "services":[
      {
         "flavors":[
            {
               "name":"t1.micro"
            },
            {
               "name":"m1.small"
            },
            {
               "name":"m1.medium"
            },
            {
               "name":"m1.large"
            },
            {
               "name":"m1.xlarge"
            },
            {
               "name":"m2.xlarge"
            },
            {
               "name":"m2.2xlarge"
            },
            {
               "name":"m2.4xlarge"
            },
            {
               "name":"c1.medium"
            },
            {
               "name":"c1.xlarge"
            },
            {
               "name":"c3.4xlarge"
            },
            {
               "name":"cr1.8xlarge"
            },
            {
               "name":"m3.medium"
            },
            {
               "name":"m3.large"
            },
            {
               "name":"m3.xlarge"
            },
            {
               "name":"m3.2xlarge"
            }
         ],
         "schema":"http://elasticbox.net/schemas/aws/compute/linux",
         "locations":[
            {
               "images":[
                  {
                     "description":"Latest AWS Linux AMI",
                     "name":"Linux Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"us-east-1b"
                        },
                        {
                           "name":"us-east-1c"
                        },
                        {
                           "name":"us-east-1d"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-53556515"
                        },
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-002b3c74"
                        },
                        {
                           "description":"172.31.32.0/20",
                           "name":"subnet-425b0b6a"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"Elasticbox:a0215ef6-dd9e-49c3-bcbf-77f1567c630c - SG for eb-aknf5",
                           "name":"sg-babf1cdf"
                        },
                        {
                           "description":"default VPC security group",
                           "name":"sg-77b71412"
                        },
                        {
                           "description":"Elasticbox:a0215ef6-dd9e-49c3-bcbf-77f1567c630c - SG for eb-u3yyi",
                           "name":"sg-12c26077"
                        }
                     ],
                     "name":"vpc-f6f10e93"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"us-east-1"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Linux AMI",
                     "name":"Linux Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"us-west-1a"
                        },
                        {
                           "name":"us-west-1b"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-68e4c32e"
                        },
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-75846010"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-14e80c71"
                        }
                     ],
                     "name":"vpc-4cf4e82e"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"us-west-1"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Linux AMI",
                     "name":"Linux Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"us-west-2a"
                        },
                        {
                           "name":"us-west-2b"
                        },
                        {
                           "name":"us-west-2c"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-b1353dc5"
                        },
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-63e2c925"
                        },
                        {
                           "description":"172.31.32.0/20",
                           "name":"subnet-97d43cf2"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-0d659d68"
                        }
                     ],
                     "name":"vpc-efa1418a"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"us-west-2"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Linux AMI",
                     "name":"Linux Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"eu-west-1a"
                        },
                        {
                           "name":"eu-west-1b"
                        },
                        {
                           "name":"eu-west-1c"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-b50ae6d0"
                        },
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-76d1f830"
                        },
                        {
                           "description":"172.31.32.0/20",
                           "name":"subnet-c75f57b3"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-91d831f4"
                        }
                     ],
                     "name":"vpc-b9c2dadb"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"eu-west-1"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Linux AMI",
                     "name":"Linux Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"ap-northeast-1a"
                        },
                        {
                           "name":"ap-northeast-1c"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-2c27046a"
                        },
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-1b4e4c6f"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-0995726c"
                        }
                     ],
                     "name":"vpc-3997885b"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"ap-northeast-1"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Linux AMI",
                     "name":"Linux Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"ap-southeast-1a"
                        },
                        {
                           "name":"ap-southeast-1b"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-ea12149e"
                        },
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-35618750"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-3c668359"
                        }
                     ],
                     "name":"vpc-95435cf7"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"ap-southeast-1"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Linux AMI",
                     "name":"Linux Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"ap-southeast-2a"
                        },
                        {
                           "name":"ap-southeast-2b"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-cb595abf"
                        },
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-95fd1af0"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-9ffa1dfa"
                        }
                     ],
                     "name":"vpc-c3e6f9a1"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"ap-southeast-2"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Linux AMI",
                     "name":"Linux Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"sa-east-1a"
                        },
                        {
                           "name":"sa-east-1b"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-04eff766"
                        },
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-24281050"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-27263d45"
                        }
                     ],
                     "name":"vpc-058e2960"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"sa-east-1"
            }
         ],
         "name":"Linux Compute",
         "icon":"images/platform/large/linux.png"
      },
      {
         "flavors":[
            {
               "name":"t1.micro"
            },
            {
               "name":"m1.small"
            },
            {
               "name":"m1.medium"
            },
            {
               "name":"m1.large"
            },
            {
               "name":"m1.xlarge"
            },
            {
               "name":"m2.xlarge"
            },
            {
               "name":"m2.2xlarge"
            },
            {
               "name":"m2.4xlarge"
            },
            {
               "name":"c1.medium"
            },
            {
               "name":"c1.xlarge"
            },
            {
               "name":"c3.4xlarge"
            },
            {
               "name":"cr1.8xlarge"
            },
            {
               "name":"m3.medium"
            },
            {
               "name":"m3.large"
            },
            {
               "name":"m3.xlarge"
            },
            {
               "name":"m3.2xlarge"
            }
         ],
         "schema":"http://elasticbox.net/schemas/aws/compute/windows",
         "locations":[
            {
               "images":[
                  {
                     "description":"Latest AWS Windows AMI",
                     "name":"Windows Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"us-east-1b"
                        },
                        {
                           "name":"us-east-1c"
                        },
                        {
                           "name":"us-east-1d"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-53556515"
                        },
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-002b3c74"
                        },
                        {
                           "description":"172.31.32.0/20",
                           "name":"subnet-425b0b6a"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"Elasticbox:a0215ef6-dd9e-49c3-bcbf-77f1567c630c - SG for eb-aknf5",
                           "name":"sg-babf1cdf"
                        },
                        {
                           "description":"default VPC security group",
                           "name":"sg-77b71412"
                        },
                        {
                           "description":"Elasticbox:a0215ef6-dd9e-49c3-bcbf-77f1567c630c - SG for eb-u3yyi",
                           "name":"sg-12c26077"
                        }
                     ],
                     "name":"vpc-f6f10e93"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"us-east-1"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Windows AMI",
                     "name":"Windows Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"us-west-1a"
                        },
                        {
                           "name":"us-west-1b"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-68e4c32e"
                        },
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-75846010"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-14e80c71"
                        }
                     ],
                     "name":"vpc-4cf4e82e"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"us-west-1"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Windows AMI",
                     "name":"Windows Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"us-west-2a"
                        },
                        {
                           "name":"us-west-2b"
                        },
                        {
                           "name":"us-west-2c"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-b1353dc5"
                        },
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-63e2c925"
                        },
                        {
                           "description":"172.31.32.0/20",
                           "name":"subnet-97d43cf2"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-0d659d68"
                        }
                     ],
                     "name":"vpc-efa1418a"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"us-west-2"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Windows AMI",
                     "name":"Windows Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"eu-west-1a"
                        },
                        {
                           "name":"eu-west-1b"
                        },
                        {
                           "name":"eu-west-1c"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-b50ae6d0"
                        },
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-76d1f830"
                        },
                        {
                           "description":"172.31.32.0/20",
                           "name":"subnet-c75f57b3"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-91d831f4"
                        }
                     ],
                     "name":"vpc-b9c2dadb"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"eu-west-1"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Windows AMI",
                     "name":"Windows Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"ap-northeast-1a"
                        },
                        {
                           "name":"ap-northeast-1c"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-2c27046a"
                        },
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-1b4e4c6f"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-0995726c"
                        }
                     ],
                     "name":"vpc-3997885b"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"ap-northeast-1"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Windows AMI",
                     "name":"Windows Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"ap-southeast-1a"
                        },
                        {
                           "name":"ap-southeast-1b"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-ea12149e"
                        },
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-35618750"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-3c668359"
                        }
                     ],
                     "name":"vpc-95435cf7"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"ap-southeast-1"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Windows AMI",
                     "name":"Windows Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"ap-southeast-2a"
                        },
                        {
                           "name":"ap-southeast-2b"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-cb595abf"
                        },
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-95fd1af0"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-9ffa1dfa"
                        }
                     ],
                     "name":"vpc-c3e6f9a1"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"ap-southeast-2"
            },
            {
               "images":[
                  {
                     "description":"Latest AWS Windows AMI",
                     "name":"Windows Compute"
                  }
               ],
               "clouds":[
                  {
                     "subnets":[
                        {
                           "name":"sa-east-1a"
                        },
                        {
                           "name":"sa-east-1b"
                        }
                     ],
                     "name":"EC2",
                     "security_groups":[
                        {
                           "name":"Automatic"
                        }
                     ]
                  },
                  {
                     "subnets":[
                        {
                           "description":"172.31.16.0/20",
                           "name":"subnet-04eff766"
                        },
                        {
                           "description":"172.31.0.0/20",
                           "name":"subnet-24281050"
                        }
                     ],
                     "description":"172.31.0.0/16",
                     "security_groups":[
                        {
                           "description":"default VPC security group",
                           "name":"sg-27263d45"
                        }
                     ],
                     "name":"vpc-058e2960"
                  }
               ],
               "keypairs":[
                  {
                     "name":"None"
                  }
               ],
               "name":"sa-east-1"
            }
         ],
         "name":"Windows Compute",
         "icon":"images/platform/large/windows.png"
      }
   ],
   "key":"AKIAJPKHHGHLEAOTKQ6A",
   "owner":"--owner--",
   "icon":"images/platform/aws.png",
   "type":"Amazon Web Services",
   "id":"8c501fe3-54d7-49eb-b5d3-05016becabe3",
   "schema":"http://elasticbox.net/schemas/aws/provider"
}

PUT /services/providers/{provider_id}

Updates an existing provider when you give the provider ID. Pass the provider object in the request body to update these fields: name, description, and members.

For AWS, you can also update the key and secret. For VMware vShpere, you can also update the username, secret, and endpoint.

Normal Response Codes

  • 200

Error Response Codes

  • Invalid Data (400)
  • Conflict (409)

Request parameters

Parameter Type Description
updated chaîne Date of the last update.
description chaîne Provider description.
created chaîne Creation date.
uri chaîne Provider uri.
nom chaîne Provider name.
services array List of services associated to the provider, each service has a name.
state chaîne Provider state, there are five possible states: initializing , processing , ready , deleting or unavailable .
members array List of members with access to the provider.
owner chaîne Provider owner.
type chaîne Provider type, there are two possible providers: Amazon Web Services or VMware vShpere.
id chaîne Provider unique identificator.
icon chaîne Provider Icon uri.
Headers:

Content-Type: application/json
Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0
Body:

    "schema": "http://elasticbox.net/schemas/gce/provider",
    "updated": "2015-10-30 12:39:06.518493",
    "project_id": "the_project_id",
    "description": "Manage cloud hosting and Linux machines, description has been updated",
    "created": "2015-10-30 12:34:09.062710",
    "deleted": null,
    "uri": "/services/providers/d86e3bfe-1edc-45b4-a03b-28d1e2b7eee2",
    "name": "GoogleComputeProvider",
    "owner": "operations",
    "state": "ready",
    "email": "therightemail@company.com",
    "admin_boxes": [],
    "members": [],
    "credentials": {},
    "services": [
        {
            "name": "Linux Compute",
            "zones": [
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "32 vCPUs, 28.8 GB RAM",
                            "name": "n1-highcpu-32"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "32 vCPUs, 208 GB RAM",
                            "name": "n1-highmem-32"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "32 vCPUs, 120 GB RAM",
                            "name": "n1-standard-32"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "asia-east1-b"
                },
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "32 vCPUs, 28.8 GB RAM",
                            "name": "n1-highcpu-32"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "32 vCPUs, 208 GB RAM",
                            "name": "n1-highmem-32"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "32 vCPUs, 120 GB RAM",
                            "name": "n1-standard-32"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "asia-east1-a"
                },
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "32 vCPUs, 28.8 GB RAM",
                            "name": "n1-highcpu-32"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "32 vCPUs, 208 GB RAM",
                            "name": "n1-highmem-32"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "32 vCPUs, 120 GB RAM",
                            "name": "n1-standard-32"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "asia-east1-c"
                },
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "europe-west1-b"
                },
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "32 vCPUs, 28.8 GB RAM",
                            "name": "n1-highcpu-32"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "32 vCPUs, 208 GB RAM",
                            "name": "n1-highmem-32"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "32 vCPUs, 120 GB RAM",
                            "name": "n1-standard-32"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "europe-west1-c"
                },
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "32 vCPUs, 28.8 GB RAM",
                            "name": "n1-highcpu-32"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "32 vCPUs, 208 GB RAM",
                            "name": "n1-highmem-32"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "32 vCPUs, 120 GB RAM",
                            "name": "n1-standard-32"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "europe-west1-d"
                },
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "32 vCPUs, 28.8 GB RAM",
                            "name": "n1-highcpu-32"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "32 vCPUs, 208 GB RAM",
                            "name": "n1-highmem-32"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "32 vCPUs, 120 GB RAM",
                            "name": "n1-standard-32"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "us-central1-f"
                },
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "us-central1-a"
                },
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "32 vCPUs, 28.8 GB RAM",
                            "name": "n1-highcpu-32"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "32 vCPUs, 208 GB RAM",
                            "name": "n1-highmem-32"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "32 vCPUs, 120 GB RAM",
                            "name": "n1-standard-32"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "us-central1-b"
                },
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "32 vCPUs, 28.8 GB RAM",
                            "name": "n1-highcpu-32"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "32 vCPUs, 208 GB RAM",
                            "name": "n1-highmem-32"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "32 vCPUs, 120 GB RAM",
                            "name": "n1-standard-32"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "us-central1-c"
                },
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "32 vCPUs, 28.8 GB RAM",
                            "name": "n1-highcpu-32"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "32 vCPUs, 208 GB RAM",
                            "name": "n1-highmem-32"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "32 vCPUs, 120 GB RAM",
                            "name": "n1-standard-32"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "us-east1-c"
                },
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "32 vCPUs, 28.8 GB RAM",
                            "name": "n1-highcpu-32"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "32 vCPUs, 208 GB RAM",
                            "name": "n1-highmem-32"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "32 vCPUs, 120 GB RAM",
                            "name": "n1-standard-32"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "us-east1-d"
                },
                {
                    "machineTypes": [
                        {
                            "description": "1 vCPU (shared physical core) and 0.6 GB RAM",
                            "name": "f1-micro"
                        },
                        {
                            "description": "1 vCPU (shared physical core) and 1.7 GB RAM",
                            "name": "g1-small"
                        },
                        {
                            "description": "16 vCPUs, 14.4 GB RAM",
                            "name": "n1-highcpu-16"
                        },
                        {
                            "description": "2 vCPUs, 1.8 GB RAM",
                            "name": "n1-highcpu-2"
                        },
                        {
                            "description": "32 vCPUs, 28.8 GB RAM",
                            "name": "n1-highcpu-32"
                        },
                        {
                            "description": "4 vCPUs, 3.6 GB RAM",
                            "name": "n1-highcpu-4"
                        },
                        {
                            "description": "8 vCPUs, 7.2 GB RAM",
                            "name": "n1-highcpu-8"
                        },
                        {
                            "description": "16 vCPUs, 104 GB RAM",
                            "name": "n1-highmem-16"
                        },
                        {
                            "description": "2 vCPUs, 13 GB RAM",
                            "name": "n1-highmem-2"
                        },
                        {
                            "description": "32 vCPUs, 208 GB RAM",
                            "name": "n1-highmem-32"
                        },
                        {
                            "description": "4 vCPUs, 26 GB RAM",
                            "name": "n1-highmem-4"
                        },
                        {
                            "description": "8 vCPUs, 52 GB RAM",
                            "name": "n1-highmem-8"
                        },
                        {
                            "description": "1 vCPU, 3.75 GB RAM",
                            "name": "n1-standard-1"
                        },
                        {
                            "description": "16 vCPUs, 60 GB RAM",
                            "name": "n1-standard-16"
                        },
                        {
                            "description": "2 vCPUs, 7.5 GB RAM",
                            "name": "n1-standard-2"
                        },
                        {
                            "description": "32 vCPUs, 120 GB RAM",
                            "name": "n1-standard-32"
                        },
                        {
                            "description": "4 vCPUs, 15 GB RAM",
                            "name": "n1-standard-4"
                        },
                        {
                            "name": "n1-standard-8"
                        }
                    ],
                    "name": "us-east1-b"
                }
            ],
            "images": [
                {
                    "description": "",
                    "name": "ubuntu-14-04-lts-v20140709"
                },
                {
                    "description": "CentOS, CentOS, 6.7, x86_64 built on 2015-09-29",
                    "name": "centos-6-v20150929"
                },
                {
                    "description": "CentOS, CentOS, 7.1.1503, x86_64 built on 2015-09-29",
                    "name": "centos-7-v20150929"
                },
                {
                    "description": "Debian, Debian GNU/Linux, 7.9 (wheezy), amd64 with backports kernel and SSH packages built on 2015-09-29",
                    "name": "backports-debian-7-wheezy-v20150929"
                },
                {
                    "description": "Accounts Beta Debian GNU/Linux, 7.9 (wheezy), amd64 with backports kernel and SSH packages and beta accounts packages built on 2015-09-30",
                    "name": "beta-accounts-backports-debian-7-wheezy-v20150930"
                },
                {
                    "description": "Accounts Beta Debian GNU/Linux, 8.1 (jessie), amd64 with beta accounts package built on 2015-09-30",
                    "name": "beta-accounts-debian-8-jessie-v20150930"
                },
                {
                    "description": "Debian, Debian GNU/Linux, 7.9 (wheezy), amd64 built on 2015-09-29",
                    "name": "debian-7-wheezy-v20150929"
                },
                {
                    "description": "Debian, Debian GNU/Linux, 8.1 (jessie), amd64 built on 2015-09-29",
                    "name": "debian-8-jessie-v20150929"
                },
                {
                    "description": "Red Hat, Red Hat Enterprise Linux, 6.7, x86_64 built on 2015-09-29",
                    "name": "rhel-6-v20150929"
                },
                {
                    "description": "Red Hat, Red Hat Enterprise Linux, 7.1, x86_64 built on 2015-09-29",
                    "name": "rhel-7-v20150929"
                },
                {
                    "description": "SLES, SUSE Linux Enterprise Server, 11 SP4, x86_64 built on 2015-07-14",
                    "name": "sles-11-sp4-v20150714"
                },
                {
                    "description": "SUSE, SUSE Linux Enterprise Server, 12, x86_64 built on 2015-05-11",
                    "name": "sles-12-v20150511"
                },
                {
                    "description": "Canonical, Ubuntu, 12.04 LTS, amd64 precise image built on 2015-09-10",
                    "name": "ubuntu-1204-precise-v20150910"
                },
                {
                    "description": "Canonical, Ubuntu, 14.04 LTS, amd64 trusty image built on 2015-09-09",
                    "name": "ubuntu-1404-trusty-v20150909a"
                },
                {
                    "description": "Canonical, Ubuntu, 15.04, amd64 vivid image built on 2015-09-11",
                    "name": "ubuntu-1504-vivid-v20150911"
                },
                {
                    "description": "Canonical, Ubuntu, 15.10, amd64 wily image built on 2015-10-26",
                    "name": "ubuntu-1510-wily-v20151026"
                }
            ],
            "icon": "images/platform/linux.png",
            "networks": [
                {
                    "routes": [],
                    "firewalls": [
                        {
                            "target_tags": [
                                "couchbase"
                            ],
                            "description": "",
                            "name": "couchbase"
                        },
                        {
                            "target_tags": [
                                "http-server"
                            ],
                            "description": "",
                            "name": "default-allow-http"
                        },
                        {
                            "target_tags": [
                                "https-server"
                            ],
                            "description": "",
                            "name": "default-allow-https"
                        },
                        {
                            "target_tags": [
                                "allow-internal"
                            ],
                            "description": "Internal traffic from default allowed",
                            "name": "default-allow-internal"
                        },
                        {
                            "target_tags": [
                                "jboss"
                            ],
                            "description": "",
                            "name": "jboss"
                        },
                        {
                            "target_tags": [
                                "jbossmgmt"
                            ],
                            "description": "",
                            "name": "jbossmgmt"
                        },
                        {
                            "target_tags": [
                                "jenkins"
                            ],
                            "description": "",
                            "name": "jenkins"
                        },
                        {
                            "target_tags": [
                                "mongo"
                            ],
                            "description": "Firewall rule for MongoDB server",
                            "description": "8 vCPUs, 30 GB RAM",
                            "name": "mongodb"
                        },
                        {
                            "target_tags": [
                                "mysql"
                            ],
                            "description": "",
                            "name": "mysql"
                        },
                        {
                            "target_tags": [
                                "rabbitmq"
                            ],
                            "description": "Firewall rule for RabbitMQ server",
                            "name": "rabbitmq"
                        },
                        {
                            "target_tags": [
                                "redis"
                            ],
                            "description": "rule used for testing redis in gce",
                            "name": "redis"
                        },
                        {
                            "target_tags": [
                                "test-firewall"
                            ],
                            "description": "Don't Delete. Use by scenario tests",
                            "name": "test-firewall"
                        },
                        {
                            "target_tags": [
                                "web"
                            ],
                            "description": "Firewall rule for Web Server",
                            "name": "web"
                        }
                    ],
                    "description": "Default network for the project",
                    "name": "default"
                }
            ],
            "schema": "http://elasticbox.net/schemas/gce/compute/linux"
        }
    ],
    "organization": "elasticbox",
    "type": "Google Compute",
    "id": "d86e3bfe-1edc-45b4-a03b-28d1e2b7eee2",
    "icon": "images/platform/google.png"
}

DELETE /services/providers/{provider_id}

Deletes an existing provider when you give the provider ID.

Normal Response Codes

  • 202

Error Response Codes

  • Invalid Data (400)
  • Forbidden (403)
  • Active service using the provider (400)

Requête

Headers:

Content-Type: application/json
Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0
DELETE /services/providers/{provider_id}

PUT /services/providers/{provider_id}/sync

Syncs an existing provider when you give the provider ID.

Normal Response Codes

  • 202

Error Response Codes

  • Forbidden (403)
  • Not Found (404)

Requête

Headers:

Content-Type: application/json
Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0

GET /services/providers/{provider_id}/logs

Retrieves the logs of a provider when you give the provider ID.

Normal Response Codes

  • 200

Error Response Codes

  • Forbidden (403)
  • Not Found (404)

Requête

Headers:

Content-Type: application/json
Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0

Response parameters

Parameter Type Description
workspace chaîne Id of the workspace who perform the action.
provider_id chaîne Provider unique identifier.
created chaîne Creation date.
text chaîne Profiver-log action description.
level integer Provider-log action level.
updated array Date of the update.
id chaîne Provider unique identifier.
schema chaîne Provider-log schema url.
[
   {
      "workspace":"--workspace name--",
      "provider_id":"8c501fe3-54d7-49eb-b5d3-05016becabe3",
      "created":"2014-03-28 12:18:02.455710",
      "text":"Provider 'MyAmazon' synchronized",
      "level":40,
      "updated":"2014-03-28 12:18:02.456441",
      "id":"6303cd2f-3c73-4b8e-9aa3-12cdacc15093",
      "schema":"http://elasticbox.net/schemas/provider-log"
   },
   {
      "workspace":"--workspace name--",
      "provider_id":"8c501fe3-54d7-49eb-b5d3-05016becabe3",
      "created":"2014-03-26 14:03:41.863572",
      "text":"Provider 'MyAmazon' synchronized",
      "level":40,
      "updated":"2014-03-26 14:03:41.864242",
      "id":"3fa58165-2af8-47eb-99e9-98f68e76c9b2",
      "schema":"http://elasticbox.net/schemas/provider-log"
   }
]

GET /services/providers/{provider_id}/unregisted-instances

Retrieves a list of unregistered instances found in a provider when you give the provider ID.

Normal Response Codes

  • 200

Error Response Codes

  • Forbidden (403)
  • Not Found (404)

Requête

Headers:

Content-Type: application/json
Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0

Response parameters

Parameter Type Description
profile objet Instance profile.
profile.subnet chaîne Instance subnet.
profile.image chaîne Instance image.
profile.keypair chaîne Instance keypair.
profile.location chaîne Instance location.
profile.security_groups chaîne Instance security groups.
profile.flavor chaîne Instance flavor.
profile.manageos boolean Instance Manage.
profile.autoscalable boolean Instance autoscalable.
profile.cloud boolean Cloud type.
profile.schema chaîne Instance schema uri.
provider_id chaîne Instance provider unique identifier.
nom chaîne Instance name.
created chaîne Creation date.
deleted chaîne Logical deletion date.
type chaîne Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service.
server_info objet Instance public and private ips and public dns.
updated array Date of the update.
power_state chaîne Can be running or stopped.
organization chaîne Organization to which instance belongs.
external_id chaîne Instance external id.
id chaîne Instance unique identifier.
schema chaîne Unregistered-instance schema url.
[
  {
    "profile": {
      "subnet": "ca-central-1a",
      "cloud": "vpc-083cc961",
      "image": "ami-bf5ee2db",
      "ebs_optimized": false,
      "instances": 1,
      "keypair": "Operations",
      "security_groups": [],
      "volumes": [],
      "flavor": "t2.micro",
      "schema": "http://elasticbox.net/schemas/aws/ec2/profile",
      "managed_os": false,
      "location": "ca-central-1"
    },
    "provider_id": "8c501fe3-54d7-49eb-b5d3-05016becabe3",
    "name": "AWS LDAP Windows",
    "created": "2017-06-15 11:40:00.243971",
    "deleted": null,
    "type": "Windows Compute",
    "server_info": {
      "public_ip": "52.62.222.233",
      "private_ip": "172.33.22.199",
      "public_dns": "ec2-52-62-222-233.ca-central-1.compute.amazonaws.com"
    },
    "updated": "2017-06-15 11:40:00.243971",
    "power_state": "running",
    "organization": "centurylink",
    "external_id": "i-06bee885e4e806ca0",
    "id": "957625f1-3c6f-423c-a8ac-430983c369f7",
    "schema": "http://elasticbox.net/schemas/unregistered-instance"
  },
  {...},
  {...}
]

POST /services/providers/{provider_id}/images

Adds a new machine image to a provider when you give the provider ID.

Normal Response Codes

  • 202

Error Response Codes

  • Invalid Data (400)
  • Forbidden (403)
  • Not Found (404)

Request Parameters

Parameter Type Description
emplacement chaîne Image location.
nom chaîne Image name.
description chaîne Image description.
Headers:

Content-Type: application/json
Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0
Body:

{
   "location":"us-east-1",
   "name":"ami-3275ee5b",
   "description":"New Image Description"
}

DELETE /services/providers/{provider_id}/images/{machine_image_id}

Deletes an existing machine image when you give the provider ID and the machine image ID.

Normal Response Codes

  • 202

Error Response Codes

  • Location query parameter is missing (400)
  • Forbidden (403)
  • Not Found (404)

Request Parameters

Parameter Type Description
emplacement chaîne Location of the machine image to be deleted.
Headers:

Content-Type: application/json
Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0
Body:

DELETE /services/providers/{provider_id}/images/{machine_image_id}?location=us-east-1

Contacting Cloud Application Manager Support

We’re sorry you’re having an issue in Cloud Application Manager. Please review the troubleshooting tips, or contact Cloud Application Manager support with details and screenshots where possible.

For issues related to API calls, send the request body along with details related to the issue.

In the case of a box error, share the box in the workspace that your organization and Cloud Application Manager can access and attach the logs.

  • Linux: SSH and locate the log at /var/log/elasticbox/elasticbox-agent.log
  • Windows: RDP into the instance to locate the log at ProgramDataElasticBoxLogselasticbox-agent.log

Reporting API

Get the cost report of your organization.

Manage an Organization

Ressource Description
GET /services/organizations/{organization}/report/{start}/{end} Gets the report of the amount spent per instance and day of a period of time.
GET /services/organizations/{organization}/csv/{start}/{end} Gets the report of the amount spent per instance and day of a period of time in CSV format.

GET /services/organizations/{organization}/report/{start}/{end}

Gets the report of the amount spent per instance and day of a period of time.

Normal Response Codes

  • 200

Common Error Response Codes

  • Wrong date format (400)
  • User not authorized to get the reports (403)
  • Organization not found (404)

URL parameters

  • organization: name of the organization
  • start: day of the start date in format ‘YYYY-MM-DD’
  • end: day of the end date in format ‘YYYY-MM-DD’

Request Headers

Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0

Response Parameters

Parameter Type Description
Coût Array List of cost per instance. Contains the following properties:
  • cost: Array of ints. Each number in the list represents the amount of fraction of dollar cents spent that day in the specific instance.
  • service: Service associated with the instance, contains among other properties:
    • state_history: List of changes in the state of the instance. Each state contains the following properties:
      • started: Required. String that represents the date in UTC when it changed its state.
      • state: Required. "up" or "down". Tells whether the instance was up or down.
      • completed: String that represents the date in UTC when it finished the current state.

Response Body

{
   "cost":[
      {
         "cost":[
            0,
            0,
            0,
            0,
            0,
            1300,
            3000,
         ],
         "service":{
            "profile":{
               "subnet":"us-west-1a",
               "cloud":"EC2",
               "image":"ami-a8d3d4ed",
               "elastic_ip":true,
               "instances":1,
               "keypair":"None",
               "role":"None",
               "location":"us-west-1",
               "volumes":[

               ],
               "flavor":"t1.micro",
               "security_groups":[

               ],
               "schema":"http://elasticbox.net/schemas/aws/ec2/profile"
            },
            "schema":"http://elasticbox.net/schemas/service",
            "provider_id":"5908ee9b-0c0a-4af6-8eef-2dc9f95d033a",
            "tags":[

            ],
            "deleted":"2015-11-16 10:40:11.484485",
            "variables":[

            ],
            "created":"2015-11-12 16:45:05.246651",
            "state_history":[
               {
                  "started":"2015-11-12 16:47:02.399111",
                  "state":"up",
                  "completed":"2015-11-13 09:29:20.728718"
               }
            ],
            "updated":"2015-11-13 09:29:20.730134",
            "token":"e327e9fb-b6c8-43fe-af94-b2f339e3d6a8",
            "state":"done",
            "organization":"elasticbox",
            "operation":"terminate",
            "type":"Linux Compute",
            "id":"eb-zwm7u",
            "machines":[
               {
                  "name":"eb-zwm7u-1",
                  "token":"cfa24ede-172f-4427-b55e-4d134cce3252",
                  "state":"processing",
                  "address":{
                     "public":"54.241.36.174",
                     "private":"10.251.133.133"
                  },
                  "external_id":"i-76dad8b6",
                  "schema":"http://elasticbox.net/schemas/aws/service-machine"
               }
            ],
            "icon":"images/platform/linux.png"
         }
      }
   ]
}

GET /services/organizations/{organization}/csv/{start}/{end}

Gets the report of the amount spent per instance and day of a period of time in CSV format.

Normal Response Codes

  • 200

Common Error Response Codes

  • Wrong date format (400)
  • User not authorized to get the reports (403)
  • Organization not found (404)

URL Parameters

  • Organization_name: name of the organization
  • start: day of the start date in format ‘YYYY-MM-DD’
  • end: day of the end date in format ‘YYYY-MM-DD’

Request Headers

Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0

Response Body

SERVICE_ID,DAY (in Date Range),SIZE,REGION,PROVIDER_TYPE,PROVIDER_ID,PROFILE_SCHEMA,CREATED (UTC),TYPE,COST (cents of $),EVENT_TYPE,INSTANCES,SIZE.CPU,SIZE.MEMORY,SIZE.DISK,CPU UNIT,MEMORY UNIT,DISK UNIT,ALLOCATED.CPU (Max.),ALLOCATED.MEMORY (Max.),ALLOCATED.DISK (Max.)
  eb-o125v,2015-10-18,m1.small,us-east-1,Amazon Web Services,5908ee9b-0c0a-4af6-8eef-2dc9f95d033a,http://elasticbox.net/schemas/aws/ec2/profile,2015-11-12 16:29:31.993282,Linux Compute,0
  eb-o125v,2015-10-19,m1.small,us-east-1,Amazon Web Services,5908ee9b-0c0a-4af6-8eef-2dc9f95d033a,http://elasticbox.net/schemas/aws/ec2/profile,2015-11-12 16:29:31.993282,Linux Compute,0

Contacting Cloud Application Manager Support

We’re sorry you’re having an issue in Cloud Application Manager. Please review the troubleshooting tips, or contact Cloud Application Manager support with details and screenshots where possible.

For issues related to API calls, send the request body along with details related to the issue.

In the case of a box error, share the box in the workspace that your organization and Cloud Application Manager can access and attach the logs.

  • Linux: SSH and locate the log at /var/log/elasticbox/elasticbox-agent.log
  • Windows: RDP into the instance to locate the log at ProgramDataElasticBoxLogselasticbox-agent.log

Organizations API

Manage an Organization

Ressource Description
GET /services/organizations/{organization_name} Gets the schema of the given organization.
PUT /services/organizations/{organization_name} Updates an existing organization.
PUT /organizations/{organization_name}/sync_groups Queues a request to sync LDAP groups.

GET /services/organizations/{organization_name}

Gets the schema of a given organization.

Normal Response Codes

  • 200

Common Error Response Codes

  • User doesn’t belong to the organization (403)
  • Not Found (404)

Request Headers

Content-Type: application/json
Elasticbox-Token: your_authentication_token
ElasticBox-Release: 4.0

Response Parameters

Parameter Type Description
schema chaîne Organization schema URI: //elasticbox.net/schemas/organization
nom chaîne Organization name
icon chaîne Organization icon URI
updated chaîne Date of the last update
created chaîne Creation date
installation boolean This is read-only. It indicates that the Cloud Application Manager appliance is set up and ready for use.
administrators array List of users who can administer the organization
domains chaîne Domains that are a part of the organization
authentication objet List of the authentication methods to allow single sign-on in the organization. Contains the following properties:
  • github: Boolean. If enabled, it is true, else false.
  • google: Boolean. If enabled, it is true, else false.
  • password: Boolean. If enabled, it is true, else false.
  • ldap: Boolean. If enabled, it is true, else false.
  • ldap_config: Object that contains the LDAP service settings:
    • ldap_group_sync: Boolean. By default it's false. Specify as true to enable synchronizing with LDAP groups.
    • sources: Array of LDAP sources. Each source has the following properties:
      • host: Required. String identifies the hostname or IP address of the LDAP service.
      • groups_dn: String specifies a fully qualified group name.
      • group_dn_filter: String defines an entity on the LDAP server. All groups are synchronised as children of this entity.
      • email_field: String specifies the email field name by which to look up users. Typically, this field is called email.
      • ldap_search_password: String specifies the password for the LDAP service account to look up users who try to log in
      • ldap_search_user: String specifies the username of the LDAP service account to look up users who try to log in.
    ldap_last_sync_completed chaîne Timestamp of the last successful LDAP group sync, for example, 2015-04-06 14:28:12.874910. Value is null if ldap_group_sync is set to false.
    ldap_groups array List of objects, each of which is an LDAP group. Each group has two properties:
  • dn: String identifier for the group.
  • name: String name shown in the workspace web interface.
  • providers array List of cloud providers the organization can enable to register and deploy. Each provider type has the following properties enabled:
  • Boolean value of true if enabled, else false.
  • type: String values of the supported cloud providers: Amazon Web Services, Openstack, VMWare vSphere, Google Compute, Microsoft Azure, Cloudstack, SoftLayer, VMware vCloud Director, Amazon Web Services GovCloud, Rackspace.
  • description: String that briefly enumerates the services from the cloud provider.
  • pricing: Array of pricing information for Linux and Windows compute instance types. Only available for Amazon Web Services.
  • tags array List of tags applied on instances deployed to cloud providers from the organization. Each tag has three properties:
  • name: String you apply as a tag.
  • type: String identifies the type of tag whether an Cloud Application Manager object or a custom one. Allowed values are Box, Workspace, Provider, Environment, Email, User ID, Service Instance ID, Service ID, Workspace ID, Instance ID, Custom.
  • value: String value of null for Cloud Application Manager objects. For custom tags, set its value using this property.
  • webhooks array List of webhooks that integrate with the organization.
    cost_centers array List of cost centers. Each cost center contains the following properties:
  • enforce: Boolean. If true, an instance cannot be deployed if it is over the quota.
  • name: String. Name of the cost center
  • workspaces: Array. List of the names that belongs to the cost center.
  • quotas: List of quotas. Each quota contains an object with the following properties:
    • cost: Required. Boolean. By default it's false. Specify as true to enable synchronizing with LDAP groups.
    • provider: Required. Boolean. By default it's false. Specify as true to enable synchronizing with LDAP groups.
    • allocated: Array. List of instances which are contributing to the current quota. Each allocated instance has these properties:
      • instance_id: Required. String. Id of the instance.
      • instances: Required. Int. Number of instances.
      • started: Required. String. Date when this instance was deployed.
      • flavor: Required. String. Type of instance.
      • region: Required. String. Region where it was deployed.
      • service_type: Required. String. Type of the service.
      • terminated: String specifies the username of the LDAP service account to look up users who try to log in.
    • resources: Object. Resources of the quota.
      • cpu: Required. Int. Number of cpu units.
      • disk: Required. Object. A disk with these properties:
        • quantity: Required. String. Amount of storage.
        • unit: Required. String. Mb, Gb or Tb.
      • ram: Required. String. Ram of the quota.
        • quantity: Required. String. Amount of storage.
        • unit: Required. String. Mb or Gb.

    Response Body

    {
       {
       "schema":"http://elasticbox.net/schemas/organization",
       "name":"elasticbox",
       "icon":"/services/blobs/download/5452705c3bbd224ef9541c41/elasticbox.png",
       "theme":null,
       "updated":"2015-04-06 14:28:12.874910",
       "created":"2014-02-14 15:12:21.526672",
       "setup":true,
       "administrators":[
          "x",
          "a",
          "bc",
          "ca",
          "ce",
          "di",
          "el",
          "ig",
          "la",
          "ma",
          "mas",
          "mr",
          "os",
          "ra",
          "ri",
          "ri",
          "ys",
          "lu"
       ],
       "domains":[
          "cam.ctl.io"
       ],
       "authentication":{
          "github":false,
          "google":true,
          "ldap":true,
          "password":false,
          "ldap_config":{
             "sources":[
                {
                   "host":"ldap://ldap.cam.ctl.io",
                   "email_field":"mail"
                }
             ]
          }
       },
       "features":{
          "admin_boxes":true,
          "cost_center":true,
          "custom_pricing":false,
          "onboard_checklist":false,
          "provider_sharing":true,
          "reporting":true
       },
       "providers":[
          {
             "enabled":true,
             "type":"Amazon Web Services",
             "description":"Manage EC2, ECS and Cloudformation instances",
             "pricing":[
                {
                   "platform":"Linux Compute",
                   "price":7000,
                   "region":"ap-southeast-2",
                   "flavor":"i2.8xlarge",
                   "schema":"http://elasticbox.net/schemas/aws/compute/pricing"
                },
                {
                   "platform":"Linux Compute",
                   "price":5,
                   "region":"us-east-1",
                   "flavor":"t2.micro",
                   "schema":"http://elasticbox.net/schemas/aws/compute/pricing"
                },
                {
                   "platform":"Windows Compute",
                   "price":10,
                   "region":"us-east-1",
                   "flavor":"t2.micro",
                   "schema":"http://elasticbox.net/schemas/aws/compute/pricing"
                }
             ]
          },
          {
             "enabled":true,
             "type":"Openstack",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"VMware vSphere",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Google Compute",
             "description":"Manage cloud hosting and Linux machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Microsoft Azure",
             "description":"Manage compute services for Windows and Linux machines.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Cloudstack",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"SoftLayer",
             "description":"Manage compute services for Windows and Linux machines.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"VMware vCloud Director",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Amazon Web Services GovCloud",
             "description":"Manage compute services in an isolated ITAR compliant AWS region.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Rackspace",
             "description":"Manage cloud hosting and Linux machines.",
             "pricing":[
    
             ]
          }
       ],
       "tags":[
          {
             "name":"workspace",
             "type":"Workspace",
             "value":null
          },
          {
             "name":"box",
             "type":"Box",
             "value":null
          },
          {
             "name":"environment",
             "type":"Environment",
             "value":null
          },
          {
             "name":"email",
             "type":"Email",
             "value":null
          },
          {
             "name":"user",
             "type":"User ID",
             "value":null
          },
          {
             "name":"Name",
             "type":"Service Instance ID",
             "value":null
          }
       ],
       "cost_centers":[
          {
             "name":"test",
             "enforce":false,
             "quotas":[
                {
                   "allocated":[
    
                   ],
                   "cost":0,
                   "provider":"2bf1bd2c-b03d-460f-80da-647d26bdbcfe"
                },
                {
                   "cost":3000,
                   "provider":"5908ee9b-0c0a-4af6-8eef-2dc9f95d033a"
                }
             ],
             "workspaces":[
                "operations"
             ]
          }
       ],
       "webhooks":[
    
       ]
    }
    

    PUT /services/organizations/{organization_name}

    Updates an existing organization given its name. Only the organization administrator can update.

    Normal Response Codes

    • 200

    Common Error Response Codes

    • User doesn’t belong to the organization (403)
    • Not Found (404)

    Request Headers

    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Request Body

    {
       "schema":"http://elasticbox.net/schemas/organization",
       "name":"elasticbox",
       "icon":"/services/blobs/download/5452705c3bbd224ef9541c41/elasticbox.png",
       "theme":null,
       "updated":"2015-04-06 14:28:12.874910",
       "created":"2014-02-14 15:12:21.526672",
       "setup":true,
       "administrators":[
          "ad",
          "al",
          "ar",
          "ca",
          "ce",
          "di",
          "el",
          "ig",
          "la",
          "ma",
          "mas",
          "mr",
          "os",
          "ra",
          "ri",
          "ric",
          "ys",
          "lu"
       ],
       "domains":[
          "cam.ctl.io"
       ],
       "authentication":{
          "github":false,
          "google":true,
          "ldap":true,
          "password":false,
          "username":null,
          "ldap_config":{
             "sources":[
                {
                   "host":"ldap://ldap.cam.ctl.io",
                   "email_field":"mail"
                }
             ]
          }
       },
       "features":{
          "admin_boxes":true,
          "cost_center":true,
          "custom_pricing":false,
          "onboard_checklist":false,
          "provider_sharing":true,
          "reporting":true
       },
       "providers":[
          {
             "enabled":true,
             "type":"Amazon Web Services",
             "description":"Manage EC2, ECS and Cloudformation instances",
             "pricing":[
                {
                   "platform":"Linux Compute",
                   "price":7000,
                   "region":"ap-southeast-2",
                   "flavor":"i2.8xlarge",
                   "schema":"http://elasticbox.net/schemas/aws/compute/pricing"
                },
                {
                   "platform":"Linux Compute",
                   "price":5,
                   "region":"us-east-1",
                   "flavor":"t2.micro",
                   "schema":"http://elasticbox.net/schemas/aws/compute/pricing"
                },
                {
                   "platform":"Windows Compute",
                   "price":10,
                   "region":"us-east-1",
                   "flavor":"t2.micro",
                   "schema":"http://elasticbox.net/schemas/aws/compute/pricing"
                }
             ]
          },
          {
             "enabled":true,
             "type":"Openstack",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"VMware vSphere",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Google Compute",
             "description":"Manage cloud hosting and Linux machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Microsoft Azure",
             "description":"Manage compute services for Windows and Linux machines.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Cloudstack",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"SoftLayer",
             "description":"Manage compute services for Windows and Linux machines.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"VMware vCloud Director",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Amazon Web Services GovCloud",
             "description":"Manage compute services in an isolated ITAR compliant AWS region.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Rackspace",
             "description":"Manage cloud hosting and Linux machines.",
             "pricing":[
    
             ]
          }
       ],
       "tags":[
          {
             "name":"workspace",
             "type":"Workspace",
             "value":null
          },
          {
             "name":"box",
             "type":"Box",
             "value":null
          },
          {
             "name":"environment",
             "type":"Environment",
             "value":null
          },
          {
             "name":"email",
             "type":"Email",
             "value":null
          },
          {
             "name":"user",
             "type":"User ID",
             "value":null
          },
          {
             "name":"Name",
             "type":"Service Instance ID",
             "value":null
          },
          {
             "name":"Testing",
             "type":"Custom",
             "value":"test"
          }
       ],
       "cost_centers":[
          {
             "name":"test",
             "enforce":false,
             "quotas":[
                {
                   "allocated":[
    
                   ],
                   "cost":0,
                   "provider":"2bf1bd2c-b03d-460f-80da-647d26bdbcfe"
                },
                {
                   "cost":3000,
                   "provider":"5908ee9b-0c0a-4af6-8eef-2dc9f95d033a"
                }
             ],
             "workspaces":[
                "operations"
             ]
          }
       ],
       "webhooks":[
    
       ]
    }
    

    Request Parameters

    Parameter Type Description
    schema chaîne Organization schema URI: //elasticbox.net/schemas/organization
    nom chaîne Organization name
    icon chaîne Organization icon URI
    updated chaîne Date of the last update
    created chaîne Creation date
    installation boolean This is read-only. It indicates that the Cloud Application Manager appliance is set up and ready for use.
    administrators array List of users who can administer the organization
    domains chaîne Domains that are a part of the organization
    authentication objet List of the authentication methods to allow single sign-on in the organization. Contains the following properties:
  • github: Boolean. If enabled, it is true, else false.
  • google: Boolean. If enabled, it is true, else false.
  • password: Boolean. If enabled, it is true, else false.
  • ldap: Boolean. If enabled, it is true, else false.
  • ldap_config: Object that contains the LDAP service settings:
    • ldap_group_sync: Boolean. By default it's false. Specify as true to enable synchronizing with LDAP groups.
    • sources: Array of LDAP sources. Each source has the following properties:
      • host: Required. String identifies the hostname or IP address of the LDAP service.
      • groups_dn: String specifies a fully qualified group name.
      • group_dn_filter: String defines an entity on the LDAP server. All groups are synchronized as children of this entity.
      • email_field: String specifies the email field name by which to look up users. Typically, this field is called email.
      • ldap_search_password: String specifies the password for the LDAP service account to look up users who try to log in
      • ldap_search_user: String specifies the username of the LDAP service account to look up users who try to log in.
    ldap_last_sync_completed chaîne Timestamp of the last successful LDAP group sync, for example, 2015-04-06 14:28:12.874910. Value is null if ldap_group_sync is set to false.
    ldap_groups array List of objects, each of which is an LDAP group. Each group has two properties:
  • dn: String identifier for the group.
  • name: String name shown in the workspace web interface.
  • providers array List of cloud providers the organization can enable to register and deploy. Each provider type has the following properties:
  • enabled: Boolean value of true if enabled, else false.
  • type: String values of the supported cloud providers: Amazon Web Services, Openstack, VMWare vSphere, Google Compute, Microsoft Azure, Cloudstack, SoftLayer, VMware vCloud Director, Amazon Web Services GovCloud, Rackspace.
  • description: String that briefly enumerates the services from the cloud provider.
  • pricing: Array of pricing information for Linux and Windows compute instance types. Only available for Amazon Web Services.
  • tags array List of tags applied on instances deployed to cloud providers from the organization. Each tag has three properties:
  • name: String you apply as a tag.
  • type: String identifies the type of tag whether an Cloud Application Manager object or a custom one. Allowed values are Box, Workspace, Provider, Environment, Email, User ID, Service Instance ID, Service ID, Workspace ID, Instance ID, Custom.
  • value: String value of null for Cloud Application Manager objects. For custom tags, set its value using this property.
  • webhooks array List of webhooks that integrate with the organization.
    cost_centers array List of cost centers. Each cost center contains the following properties:
  • enforce: Boolean. If true, an instance cannot be deployed if it is over the quota.
  • name: String. Name of the cost center
  • workspaces: Array. List of the names that belongs to the cost center.
  • quotas: List of quotas. Each quota contains an object with the following properties:
    • cost: Required. Boolean. By default it's false. Specify as true to enable synchronizing with LDAP groups.
    • provider: Required. Boolean. By default it's false. Specify as true to enable synchronizing with LDAP groups.
    • allocated: Array. List of instances which are contributing to the current quota. Each allocated instance has these properties:
      • instance_id: Required. String. Id of the instance.
      • instances: Required. Int. Number of instances.
      • started: Required. String. Date when this instance was deployed.
      • flavor: Required. String. Type of instance.
      • region: Required. String. Region where it was deployed.
      • service_type: Required. String. Type of the service.
      • terminated: String specifies the username of the LDAP service account to look up users who try to log in.
    • resources: Object. Resources of the quota.
      • cpu: Required. Int. Number of cpu units.
      • disk: Required. Object. A disk with these properties:
        • quantity: Required. String. Amount of storage.
        • unit: Required. String. Mb, Gb or Tb.
      • ram: Required. String. Ram of the quota.
        • quantity: Required. String. Amount of storage.
        • unit: Required. String. Mb or Gb.

    Response Parameters

    Parameter Type Description
    schema chaîne Organization schema URI: http://elasticbox.net/schemas/organization
    nom chaîne Organization name
    icon chaîne Organization icon URI
    updated chaîne Date of the last update
    created chaîne Creation date
    installation boolean This is read-only. It indicates that the Cloud Application Manager appliance is set up and ready for use.
    administrators array List of users who can administer the organization
    domains chaîne Domains that are a part of the organization
    authentication objet List of the authentication methods to allow single sign-on in the organization. Contains the following properties:
  • github: Boolean. If enabled, it is true, else false.
  • google: Boolean. If enabled, it is true, else false.
  • password: Boolean. If enabled, it is true, else false.
  • ldap: Boolean. If enabled, it is true, else false.
  • ldap_config: Object that contains the LDAP service settings:
    • ldap_group_sync: Boolean. By default it's false. Specify as true to enable synchronizing with LDAP groups.
    • sources: Array of LDAP sources. Each source has the following properties:
      • host: Required. String identifies the hostname or IP address of the LDAP service.
      • groups_dn: String specifies a fully qualified group name.
      • group_dn_filter: String defines an entity on the LDAP server. All groups are synchronized as children of this entity.
      • email_field: String specifies the email field name by which to look up users. Typically, this field is called email.
      • ldap_search_password: String specifies the password for the LDAP service account to look up users who try to log in
      • ldap_search_user: String specifies the username of the LDAP service account to look up users who try to log in.
    ldap_last_sync_completed chaîne Timestamp of the last successful LDAP group sync, for example, 2015-04-06 14:28:12.874910. Value is null if ldap_group_sync is set to false.
    ldap_groups array List of objects, each of which is an LDAP group. Each group has two properties:
  • dn: String identifier for the group.
  • name: String name shown in the workspace web interface.
  • providers array List of cloud providers the organization can enable to register and deploy. Each provider type has the following properties enabled:
  • Boolean value of true if enabled, else false.
  • type: String values of the supported cloud providers: Amazon Web Services, Openstack, VMWare vSphere, Google Compute, Microsoft Azure, Cloudstack, SoftLayer, VMware vCloud Director, Amazon Web Services GovCloud, Rackspace.
  • description: String that briefly enumerates the services from the cloud provider.
  • pricing: Array of pricing information for Linux and Windows compute instance types. Only available for Amazon Web Services.
  • tags array List of tags applied on instances deployed to cloud providers from the organization. Each tag has three properties:
  • name: String you apply as a tag.
  • type: String identifies the type of tag whether an Cloud Application Manager object or a custom one. Allowed values are Box, Workspace, Provider, Environment, Email, User ID, Service Instance ID, Service ID, Workspace ID, Instance ID, Custom.
  • value: String value of null for Cloud Application Manager objects. For custom tags, set its value using this property.
  • webhooks array List of webhooks that integrate with the organization.
    cost_centers array List of cost centers. Each cost center contains the following properties:
  • enforce: Boolean. If true, an instance cannot be deployed if it is over the quota.
  • name: String. Name of the cost center
  • workspaces: Array. List of the names that belongs to the cost center.
  • quotas: List of quotas. Each quota contains an object with the following properties:
    • cost: Required. Boolean. By default it's false. Specify as true to enable synchronizing with LDAP groups.
    • provider: Required. Boolean. By default it's false. Specify as true to enable synchronizing with LDAP groups.
    • allocated: Array. List of instances which are contributing to the current quota. Each allocated instance has these properties:
      • instance_id: Required. String. Id of the instance.
      • instances: Required. Int. Number of instances.
      • started: Required. String. Date when this instance was deployed.
      • flavor: Required. String. Type of instance.
      • region: Required. String. Region where it was deployed.
      • service_type: Required. String. Type of the service.
      • terminated: String specifies the username of the LDAP service account to look up users who try to log in.
    • resources: Object. Resources of the quota.
      • cpu: Required. Int. Number of cpu units.
      • disk: Required. Object. A disk with these properties:
        • quantity: Required. String. Amount of storage.
        • unit: Required. String. Mb, Gb or Tb.
      • ram: Required. String. Ram of the quota.
        • quantity: Required. String. Amount of storage.
        • unit: Required. String. Mb or Gb.

    Response Body

    {
       "schema":"http://elasticbox.net/schemas/organization",
       "name":"elasticbox",
       "icon":"/services/blobs/download/5452705c3bbd224ef9541c41/elasticbox.png",
       "theme":null,
       "updated":"2015-04-06 20:38:46.060399",
       "created":"2014-02-14 15:12:21.526672",
       "setup":true,
       "administrators":[
          "ad",
          "al",
          "ar",
          "ca",
          "ce",
          "di",
          "el",
          "ig",
          "la",
          "ma",
          "mas",
          "mr",
          "os",
          "ra",
          "ri",
          "ric",
          "ys",
          "lu"
       ],
       "domains":[
          "cam.ctl.io"
       ],
       "authentication":{
          "github":false,
          "google":true,
          "ldap":true,
          "password":false,
          "username":null,
          "ldap_config":{
             "sources":[
                {
                   "host":"ldap://ldap.cam.ctl.io",
                   "email_field":"mail"
                }
             ]
          }
       },
       "features":{
          "admin_boxes":true,
          "cost_center":true,
          "custom_pricing":false,
          "onboard_checklist":false,
          "provider_sharing":true,
          "reporting":true
       },
       "providers":[
          {
             "enabled":true,
             "type":"Amazon Web Services",
             "description":"Manage EC2, ECS and Cloudformation instances",
             "pricing":[
                {
                   "platform":"Linux Compute",
                   "price":7000,
                   "region":"ap-southeast-2",
                   "flavor":"i2.8xlarge",
                   "schema":"http://elasticbox.net/schemas/aws/compute/pricing"
                },
                {
                   "platform":"Linux Compute",
                   "price":5,
                   "region":"us-east-1",
                   "flavor":"t2.micro",
                   "schema":"http://elasticbox.net/schemas/aws/compute/pricing"
                },
                {
                   "platform":"Windows Compute",
                   "price":10,
                   "region":"us-east-1",
                   "flavor":"t2.micro",
                   "schema":"http://elasticbox.net/schemas/aws/compute/pricing"
                }
             ]
          },
          {
             "enabled":true,
             "type":"Openstack",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"VMware vSphere",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Google Compute",
             "description":"Manage cloud hosting and Linux machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Microsoft Azure",
             "description":"Manage compute services for Windows and Linux machines.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Cloudstack",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"SoftLayer",
             "description":"Manage compute services for Windows and Linux machines.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"VMware vCloud Director",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Amazon Web Services GovCloud",
             "description":"Manage compute services in an isolated ITAR compliant AWS region.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Rackspace",
             "description":"Manage cloud hosting and Linux machines.",
             "pricing":[
    
             ]
          }
       ],
       "tags":[
          {
             "name":"workspace",
             "type":"Workspace",
             "value":null
          },
          {
             "name":"box",
             "type":"Box",
             "value":null
          },
          {
             "name":"environment",
             "type":"Environment",
             "value":null
          },
          {
             "name":"email",
             "type":"Email",
             "value":null
          },
          {
             "name":"user",
             "type":"User ID",
             "value":null
          },
          {
             "name":"Name",
             "type":"Service Instance ID",
             "value":null
          },
          {
             "name":"Testing",
             "type":"Custom",
             "value":"test"
          }
       ],
       "cost_centers":[
          {
             "name":"test",
             "enforce":false,
             "quotas":[
                {
                   "allocated":[
    
                   ],
                   "cost":0,
                   "provider":"2bf1bd2c-b03d-460f-80da-647d26bdbcfe"
                },
                {
                   "cost":3000,
                   "provider":"5908ee9b-0c0a-4af6-8eef-2dc9f95d033a"
                }
             ],
             "workspaces":[
                "operations"
             ]
          }
       ],
       "webhooks":[
    
       ]
    }
    

    PUT /organizations/{organization_name}/sync_groups

    Queues a request to sync LDAP groups. The sync request, depending on the amount of data from the LDAP service, can take a few minutes. The ldap_last_sync_completed property updates when the request finishes successfully.

    Normal Response Codes

    • 200

    Error Response Codes

    • Not Found (404)

    Request Headers

    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Type Description
    schema chaîne Organization schema URI: //elasticbox.net/schemas/organization
    nom chaîne Organization name
    icon chaîne Organization icon URI
    updated chaîne Date of the last update
    created chaîne Creation date
    installation boolean This is read-only. It indicates that the Cloud Application Manager appliance is set up and ready for use.
    administrators array List of users who can administer the organization
    domains chaîne Domains that are a part of the organization
    authentication objet List of the authentication methods to allow single sign-on in the organization. Contains the following properties:
  • github: Boolean. If enabled, it is true, else false.
  • google: Boolean. If enabled, it is true, else false.
  • password: Boolean. If enabled, it is true, else false.
  • ldap: Boolean. If enabled, it is true, else false.
  • ldap_config: Object that contains the LDAP service settings:
    • ldap_group_sync: Boolean. By default it's false. Specify as true to enable synchronizing with LDAP groups.
    • sources: Array of LDAP sources. Each source has the following properties:
      • host: Required. String identifies the hostname or IP address of the LDAP service.
      • groups_dn: String specifies a fully qualified group name.
      • group_dn_filter: String defines an entity on the LDAP server. All groups are synchronised as children of this entity.
      • email_field: String specifies the email field name by which to look up users. Typically, this field is called email.
      • ldap_search_password: String specifies the password for the LDAP service account to look up users who try to log in
      • ldap_search_user: String specifies the username of the LDAP service account to look up users who try to log in.
    ldap_last_sync_completed chaîne Timestamp of the last successful LDAP group sync, for example, 2015-04-06 14:28:12.874910. Value is null if ldap_group_sync is set to false.
    ldap_groups array List of objects, each of which is an LDAP group. Each group has two properties:
  • dn: String identifier for the group.
  • name: String name shown in the workspace web interface.
  • providers array List of cloud providers the organization can enable to register and deploy. Each provider type has the following properties enabled:
  • Boolean value of true if enabled, else false.
  • type: String values of the supported cloud providers: Amazon Web Services, Openstack, VMWare vSphere, Google Compute, Microsoft Azure, Cloudstack, SoftLayer, VMware vCloud Director, Amazon Web Services GovCloud, Rackspace.
  • description: String that briefly enumerates the services from the cloud provider.
  • pricing: Array of pricing information for Linux and Windows compute instance types. Only available for Amazon Web Services.
  • tags array List of tags applied on instances deployed to cloud providers from the organization. Each tag has three properties:
  • name: String you apply as a tag.
  • type: String identifies the type of tag whether an Cloud Application Manager object or a custom one. Allowed values are Box, Workspace, Provider, Environment, Email, User ID, Service Instance ID, Service ID, Workspace ID, Instance ID, Custom.
  • value: String value of null for Cloud Application Manager objects. For custom tags, set its value using this property.
  • webhooks array List of webhooks that integrate with the organization.
    cost_centers array List of cost centers. Each cost center contains the following properties:
  • enforce: Boolean. If true, an instance cannot be deployed if it is over the quota.
  • name: String. Name of the cost center
  • workspaces: Array. List of the names that belongs to the cost center.
  • quotas: List of quotas. Each quota contains an object with the following properties:
    • cost: Required. Boolean. By default it's false. Specify as true to enable synchronizing with LDAP groups.
    • provider: Required. Boolean. By default it's false. Specify as true to enable synchronizing with LDAP groups.
    • allocated: Array. List of instances which are contributing to the current quota. Each allocated instance has these properties:
      • instance_id: Required. String. Id of the instance.
      • instances: Required. Int. Number of instances.
      • started: Required. String. Date when this instance was deployed.
      • flavor: Required. String. Type of instance.
      • region: Required. String. Region where it was deployed.
      • service_type: Required. String. Type of the service.
      • terminated: String specifies the username of the LDAP service account to look up users who try to log in.
    • resources: Object. Resources of the quota.
      • cpu: Required. Int. Number of cpu units.
      • disk: Required. Object. A disk with these properties:
        • quantity: Required. String. Amount of storage.
        • unit: Required. String. Mb, Gb or Tb.
      • ram: Required. String. Ram of the quota.
        • quantity: Required. String. Amount of storage.
        • unit: Required. String. Mb or Gb.

    Response Body

    {
       "schema":"http://elasticbox.net/schemas/organization",
       "name":"organization_name",
       "icon":null,
       "theme":null,
       "updated":"2015-04-06 16:59:02.486606",
       "created":"2015-03-25 10:41:15.098256",
       "setup":true,
       "administrators":[
          "operations"
       ],
       "domains":[
          "cam.ctl.io"
       ],
       "authentication":{
          "ldap_config":{
             "ldap_group_sync":false,
             "sources":[
                {
                   "host":"ldap://test_ldap"
                }
             ]
          },
          "github":true,
          "google":true,
          "ldap":true,
          "password":true,
       },
       "ldap_groups":[
    
       ],
       "providers":[
          {
             "enabled":true,
             "type":"Amazon Web Services",
             "description":"Manage EC2, ECS and Cloudformation instances",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Google Compute",
             "description":"Manage cloud hosting and Linux machines.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Openstack",
             "description":"Manage cloud hosting, Linux and Windows machines.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"VMware vSphere",
             "description":"Manage cloud hosting, Linux and Windows machines",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Microsoft Azure",
             "description":"Manage compute services for Windows and Linux machines.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Cloudstack",
             "description":"Manage cloud hosting, Linux and Windows machines.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"VMware vCloud Director",
             "description":"Manage cloud hosting, Linux and Windows machines.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Amazon Web Services GovCloud",
             "description":"Manage compute services in an isolated ITAR compliant AWS region.",
             "pricing":[
    
             ]
          },
          {
             "enabled":true,
             "type":"Rackspace",
             "description":"Manage cloud hosting and Linux machines.",
             "pricing":[
    
             ]
          }
       ],
       "ldap_last_sync_completed":null,
       "tags":[
          {
             "name":"box",
             "type":"Box name",
             "value":null
          },
          {
             "name":"environment",
             "type":"Environment",
             "value":null
          },
          {
             "name":"devenv",
             "type":"Custom",
             "value":"Cloud Application Manager Dev Environment"
          }
       ],
       "cost_centers":[
          {
             "name":"test",
             "enforce":false,
             "quotas":[
                {
                   "allocated":[
    
                   ],
                   "cost":0,
                   "provider":"2bf1bd2c-b03d-460f-80da-647d26bdbcfe"
                },
                {
                   "cost":3000,
                   "provider":"5908ee9b-0c0a-4af6-8eef-2dc9f95d033a"
                }
             ],
             "workspaces":[
                "operations"
             ]
          }
       ],
       "webhooks":[
    
       ]
    }
    

    Contacting Cloud Application Manager Support

    We’re sorry you’re having an issue in Cloud Application Manager. Please review the troubleshooting tips, or contact Cloud Application Manager support with details and screenshots where possible.

    For issues related to API calls, send the request body along with details related to the issue.

    In the case of a box error, share the box in the workspace that your organization and Cloud Application Manager can access and attach the logs.

    • Linux: SSH and locate the log at /var/log/elasticbox/elasticbox-agent.log
    • Windows: RDP into the instance to locate the log at ProgramDataElasticBoxLogselasticbox-agent.log

    Workspaces API

    Manage and perform actions on workspaces.

    Create or List Workspaces

    Ressource Description
    GET /services/workspaces Gets the list of workspaces.
    POST /services/workspace Creates a new team workspace.

    Perform Other Workspace Operations

    Parameter Description
    GET /services/workspaces/{workspace_id} Fetches an existing workspace.
    PUT /services/workspaces/{workspace_id} Updates an existing workspace.
    DELETE /services/workspaces/{workspace_id} Deletes an existing workspace.
    GET /services/workspaces/{workspace_id}/providers Gets the cloud providers registered in a workspace.
    GET /services/workspaces/{workspace_id}/boxes Gets the boxes in a workspace.
    GET /services/workspaces/{workspace_id}/instances Gets the instances in a workspace.

    GET /services/workspaces

    Gets a list of all accessible workspaces. There are two types of workspaces: personal workspaces for a single user and team workspaces that can have many members and organizations.

    Normal Response Codes

    • 200

    Error Response Codes

    • Bad Request (400)

    Requête

    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Type Description
    organizations array Lists of organizations of the workspace.
    updated chaîne Date of the last update. Example "2015-07-02 10:23:47.748740"
    nom chaîne Workspace name.
    created chaîne Creation date. Example “2015-07-02 10:23:47.748740”
    uri chaîne Workspace uri.
    members array Lists members of a team workspace.
    group_dns array List of fully qualified names of LDAP groups to which a user's personal workspace belongs. You can't update this field. Present in Personal Workspaces
    ldap_groups array List of fully qualified names of LDAP groups that are members of a workspace. Present in Team Workspaces
    id chaîne Workspace unique identifier.
    add_provider xsd:boolean Indicates true if a personal workspace has a provider.
    deploy_instance xsd:boolean Shows true when there are deployed instances in the personal workspace.
    courriel chaîne User email, this parameter is used only in personal workspaces.
    owner chaîne Refers to the username that owns the workspace. Present in Team Workspaces
    icon chaîne Workspace icon.
    schema chaîne Schema URI. Either “http://elasticbox.net/schemas/workspaces/personal” or “http://elasticbox.net/schemas/workspaces/team”

    Response Body

    [
       {
          "organizations":[
             "public"
          ],
          "updated":"2014-08-11 23:01:13.703971",
          "name":"brand new workspace",
          "created":"2014-08-11 23:01:13.703971",
          "uri":"/services/workspaces/brand",
          "members":[
                    {
                            "role": "collaborator",
                            "workspace": "david"
                    },
                    {
                            "role": "collaborator",
                        "workspace": "oscar"
                    }
          ],
          "owner":"owner_name",
          "id":"brand",
          "schema":"http://elasticbox.net/schemas/workspaces/team"
       },
       {
          "updated":"2014-10-10 17:53:06.342558",
          "take_tour":true,
          "name":"owner_name",
          "icon":"/services/blobs/download/54381cfe17268876881a7b57/headshot.png",
          "created":"2014-03-20 16:32:03.077480",
          "uri":"/services/workspaces/username",
          "email":"username@host.com",
          "add_provider":true,
          "organization":"public",
          "deploy_instance":true,
          "id":"username",
          "schema":"http://elasticbox.net/schemas/workspaces/personal"
       }
    ]
    

    POST /services/workspaces

    Creates a new team workspace and gets the created workspace.

    Normal Response Codes

    • 200

    Common Error Response Codes

    • Invalid Data (400)
    • Conflict (409)

    Request Headers

    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Parameter Type Description
    owner chaîne User that owns the workspace.
    schema chaîne Workspace schema. Always “http://elasticbox.net/schemas/workspaces/team”
    organizations array List of organizations with access to the workspace.
    nom chaîne Workspace name.
    icon chaîne Workspace icon.
    members array List of users with access to the workspace. The role is always collaborator. See example request for more details.
    ldap_groups array List of fully qualified names of LDAP groups that are members of a team workspace.

    Request Body

    {
    "schema": "http://elasticbox.net/schemas/workspaces/team",
    "name": "Project Elastic",
    "members": [
            {
                    "role": "collaborator",
                    "workspace": "david"
            }
    ],
    "owner": "operations"
    }
    
    Parameter Type Description
    organizations array List of organizations with access to the workspace.
    updated chaîne Date of the last update.
    nom chaîne Workspace name.
    created chaîne Creation date.
    uri chaîne Workspace uri. It is: “http://elasticbox.net/schemas/workspaces/team”
    members array List of users with access to the workspace.
    ldap_groups array List of fully qualified names of LDAP groups that are members of a team workspace.
    owner chaîne User that owns the workspace.
    icon chaîne Workspace icon uri.
    id chaîne List of users with access to the workspace.
    schema chaîne Workspace schema uri.

    Response Body

    {
      "organizations": [
        "public"
      ],
      "updated": "2015-07-02 14:38:42.107981",
      "name": "Project Elastic",
      "created": "2015-07-02 14:38:42.107981",
      "deleted": null,
      "uri": "/services/workspaces/project",
      "ldap_groups": [],
      "members": [
        {
          "role": "collaborator",
          "workspace": "david"
        }
      ],
      "owner": "operations",
      "id": "project",
      "schema": "http://elasticbox.net/schemas/workspaces/team"
    }
    

    GET /services/workspaces/{workspace_id}

    Fetches an existing workspace for the specified workspace ID.

    Normal Response Codes

    • 200

    Common Error Response Codes

    • Not Found (404)
    • Conflict (409)

    Request Headers

    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Parameter Type Description
    organizations array Lists team workspaces for the account.
    updated chaîne Date of the last update.
    nom chaîne Workspace name.
    created chaîne Creation date.
    uri chaîne Workspace uri.
    members array Lists members of a team workspace.
    group_dns array List of fully qualified names of LDAP groups to which a user's personal workspace belongs. You can't update this field.
    ldap_groups array List of fully qualified names of LDAP groups that are members of a team workspace.
    id chaîne Workspace unique identifier.
    add_provider xsd:boolean Shows true if a personal workspace has a provider.
    deploy_instance xsd:boolean Shows true when there are deployed instances in the personal workspace.
    courriel chaîne Shows the email of the user that owns the personal workspace.
    owner chaîne Is the owner of a team workspace.
    schema chaîne Schema uri.

    Response Body

    {
      "organizations": [
        "public
      ],
      "updated": "2015-07-02 14:38:42.107981",
      "name": "Project Elastic",
      "created": "2015-07-02 14:38:42.107981",
      "deleted": null,
      "uri": "/services/workspaces/project",
      "id": "project",
      "members": [
        {
          "role": "collaborator",
          "workspace": "david"
        }
      ],
      "owner": "operations",
      "ldap_groups": [],
      "schema": "http://elasticbox.net/schemas/workspaces/team"
    }
    

    PUT /services/workspaces/{workspace_id}

    Updates an existing workspace, requires the specified id workspace_id.

    Normal Response Codes

    • 200

    Common Error Response Codes

    • Invalid Data (400)
    • Forbidden (403)
    • Not Found (404)

    Request Headers

    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Request Parameters

    Parameter Type Description
    organizations array List of organizations with access to the workspace.
    updated chaîne Date of the last update.
    nom chaîne Workspace name.
    created chaîne Creation date.
    uri chaîne Workspace uri.
    members array List of users with access to the workspace.
    group_dns array List of fully qualified names of LDAP groups to which a user's personal workspace belongs. You can't update this field.
    ldap_groups array List of fully qualified names of LDAP groups that are members of a team workspace.
    owner chaîne User that owns the workspace.
    icon chaîne Workspace icon uri.
    id chaîne List of users with access to the workspace.
    schema chaîne Workspace schema uri.

    Request Body

    {
       "organizations":[
           "public"
       ],
       "updated":"2014-03-20 21:58:36.109138",
       "name":"--workspace name--",
       "created":"2014-03-20 21:58:36.109138",
       "uri":"/services/workspaces/--workspace name--",
       "members":[
                    {
                            "role": "collaborator",
                            "workspace": "david"
                    },
                    {
                            "role": "collaborator",
                            "workspace": "oscar"
                    }
       ],
       "owner":"--owner name--",
       "icon":"--url icon--",
       "id":"--id--",
       "schema":"http://elasticbox.net/schemas/workspaces/team"
    }
    

    Response Parameters

    Parameter Type Description
    organizations array List of organizations with access to the workspace.
    updated chaîne Date of the last update.
    nom chaîne Workspace name.
    created chaîne Creation date.
    uri chaîne Workspace uri.
    members array List of users with access to the workspace.
    group_dns array List of fully qualified names of LDAP groups to which a user's personal workspace belongs. You can't update this field.
    ldap_groups array List of fully qualified names of LDAP groups that are members of a team workspace.
    owner chaîne User that owns the workspace.
    icon chaîne Workspace icon uri.
    id chaîne List of users with access to the workspace.
    schema chaîne Workspace schema uri.

    Response Body

    {
      "organizations": [
        "public"
      ],
      "updated": "2015-07-02 14:48:33.527673",
      "name": "Project Elastic",
      "created": "2015-07-02 14:38:42.107981",
      "deleted": null,
      "uri": "/services/workspaces/project",
      "members": [
        {
          "role": "collaborator",
          "workspace": "david"
        },
        {
          "role": "collaborator",
          "workspace": "operations"
        }
      ],
      "owner": "--owner name--",
      "id":"--id--",
      "icon":"--url icon--",
      "ldap_groups": [],
      "schema": "http://elasticbox.net/schemas/workspaces/team"
    }
    

    DELETE /services/workspaces/{workspace_id}

    Deletes an existing workspace, requires the specified id workspace_id.

    Normal Response Codes

    • 204

    Common Error Response Codes

    • Forbidden (403)
    • Not Found (404)

    Request Headers

    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    GET /services/workspaces/{workspace_id}/providers

    Gets a list of workspace providers, requires the specified id workspace_id.There are two types of providers: Amazon Web Services and VMware vShpere.

    Normal Response Codes

    • 200

    Common Error Response Codes

    • Bad Request (400)

    Request Headers

    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Type Description
    updated chaîne Date of the last update.
    description chaîne Provider description.
    created chaîne Creation date.
    uri chaîne Provider uri.
    nom chaîne Provider name.
    state chaîne Provider state, there are five possible states: initializing, processing, ready, deleting or unavailable.
    members array List of members with access to the provider.
    owner chaîne Provider owner.
    type chaîne Provider type. Check the Provider page in the API for more info.
    id chaîne Provider unique identificator.
    icon chaîne Provider Icon uri.
    
       {
          "updated":"2014-03-21 17:27:18.731525",
          "description":"Manage EC2, ECS and Cloudformation instances",
          "created":"2014-03-21 17:27:06.848858",
          "uri":"--Provider uri--",
          "name":"Amazon",
          "services":[
             {
                "name":"Linux Compute"
             },
             {
                "name":"Windows Compute"
             }
          ],
          "state":"ready",
          "members":[
                     {
                        "role": "collaborator",
                        "workspace": "david"
                      },
                      {
                        "role": "collaborator",
                        "workspace": "operations"
                      }
          ],
          "owner":"workspace1",
          "type":"Amazon Web Services",
          "id":"--Provider id--",
          "icon":"images/platform/aws.png"
       }
    ]
    

    GET /services/workspaces/{workspace_id}/boxes

    Gets a list of workspace boxes, requires the specified id workspace_id.

    Normal Response Codes

    • 200

    Common Error Response Codes

    • Bad Request (400)

    Request Headers

    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Type Description
    organizations array List of organizations with access to the box.
    updated chaîne Date of the last update.
    description chaîne Box description.
    tags array Box tags.
    variables array List of box variables, each variable object contains the parameters: type, name and value.
    created chaîne Creation date.
    uri chaîne Box uri.
    id array Box unique identificator.
    schema chaîne Box schema uri.
    members array List of Box members.
    group_dns array List of fully qualified names of LDAP groups to which a user's personal workspace belongs. You can't update this field.
    ldap_groups array List of fully qualified names of LDAP groups that are members of a team workspace.
    owner chaîne Box owner.
    icon chaîne Box icon uri.
    events array List of Box events, there may be nine event lists: configure, dispose, install, pre_configure, pre_dispose, pre_install, pre_start, pre_stop, start and stop.
    event objet Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path.
    nom chaîne Box name.

    Response Body

    [
       {
          "organization": "public",
          "updated":"2014-03-08 00:01:57.792623",
          "description":"Cookbook with a simple recipe",
          "service":"Linux Compute",
          "tags":[
             "Chef"
          ],
          "variables":[
             {
                "type":"Text",
                "name":"CHEF_COOKBOOK_NAME",
                "value":"elasticbox"
             },
             {
                "type":"File",
                "name":"CHEF_DEFAULT_RB",
                "value":"/services/blobs/download/52fe31c349bbcc830f342f7f/default.rb"
             },
             {
                "scope":"chef_solo",
                "type":"File",
                "name":"CHEF_METADATA_RB",
                "value":"/services/blobs/download/52fe31c449bbcc830f342f81/metadata.rb"
             },
             {
                "scope":"chef_solo",
                "type":"File",
                "name":"CHEF_SOLO_JSON",
                "value":"/services/blobs/download/52fe31c549bbcc830f342f83/solo.json"
             },
             {
                "type":"Box",
                "name":"chef_solo",
                "value":"05b76b08-5238-4e05-ae5f-8ea8afe00378"
             }
          ],
          "created":"2014-02-14 15:10:36.368716",
          "uri":"/services/boxes/c149114d-8298-4c36-be8a-1fb02e6ec975",
          "id":"c149114d-8298-4c36-be8a-1fb02e6ec975",
          "schema":"http://elasticbox.net/schemas/box",
          "members":[
             "member1","member2"
          ],
          "owner":"public",
          "bindings":[
             {
                "box":"05b76b08-5238-4e05-ae5f-8ea8afe00378",
                "name":"chef_solo"
             },
             {
                "box":"b9abd0d9-0e9c-4c2c-928a-2896e35d854d",
                "name":"git_repository"
             }
          ],
          "icon":"images/platform/chef-cookbook.png",
          "events":{
             "pre_install":{
                "url":"/services/blobs/download/52fe31c249bbcc830f342f7d/pre_install",
                "upload_date":"2014-02-14 15:09:55.095819",
                "length":262,
                "destination_path":"scripts"
             }
          },
          "name":"Chef Cookbook"
       },
       {
          "organization": "public",
          "updated":"2014-03-08 00:01:57.844612",
          "description":"Opscode Chef client",
          "service":"Linux Compute",
          "tags":[
             "Chef",
             "Ruby"
          ],
          "variables":[
             {
                "type":"File",
                "name":"CHEF_SOLO_JSON",
                "value":"/services/blobs/download/52fe31c849bbcc830f342f89/solo.json"
             },
             {
                "type":"File",
                "name":"CHEF_SOLO_RB",
                "value":"/services/blobs/download/52fe31c949bbcc830f342f8b/solo.rb"
             },
             {
                "type":"File",
                "name":"CHEF_METADATA_RB",
                "value":"/services/blobs/download/52fe31ca49bbcc830f342f8d/metadata.rb"
             },
             {
                "type":"File",
                "name":"BERKSFILE",
                "value":"/services/blobs/download/52fe31cc49bbcc830f342f8f/Berksfile"
             },
             {
                "type":"Box",
                "name":"Ruby",
                "value":"a27e3cdf-4d32-4972-aec1-32ebc4e37e1b"
             }
          ],
          "created":"2014-02-14 15:10:36.368716",
          "uri":"/services/boxes/05b76b08-5238-4e05-ae5f-8ea8afe00378",
          "id":"05b76b08-5238-4e05-ae5f-8ea8afe00378",
          "schema":"http://elasticbox.net/schemas/box",
          "members":[
                     "member1","member2"
          ],
          "owner":"public",
          "bindings":[
             {
                "box":"05b76b08-5238-4e05-ae5f-8ea8afe00378",
                "name":"chef_solo"
             },
             {
                "box":"b9abd0d9-0e9c-4c2c-928a-2896e35d854d",
                "name":"git_repository"
             }
          ],
          "icon":"images/platform/chef.png",
          "events":{
             "configure":{
                "url":"/services/blobs/download/52fe31c749bbcc830f342f87/configure",
                "upload_date":"2014-02-14 15:10:00.517413",
                "length":251,
                "destination_path":"scripts"
             },
             "pre_install":{
                "url":"/services/blobs/download/52fe31c649bbcc830f342f85/pre_install",
                "upload_date":"2014-02-14 15:09:59.289119",
                "length":378,
                "destination_path":"scripts"
             }
          },
          "name":"Chef Solo"
       }
    ]
    

    GET /services/workspaces/{workspace_id}/instances

    Gets a list of workspace instances, requires the specified id workspace_id.

    Normal Response Codes

    • 200

    Common Error Response Codes

    • Bad Request (400)

    Request Headers

    Headers:
    
            Content-Type: application/json
            Elasticbox-Token: your_authentication_token
            ElasticBox-Release: 4.0
    

    Request Parameters

    Parameter Type Description
    (optional) service chaîne Unique identifier of a deployed service, allows to filter instance by service type.

    Response Parameters

    Parameter Type Description
    updated chaîne Date of the last update.
    operation chaîne Last operation, there are seven types of operations: deploy, shutdown, poweron, reinstall, reconfigure, terminate and terminate_service.
    nom chaîne Instance name.
    service Objet Instance service.
    service.type chaîne Required. Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service.
    service.id chaîne Service type.
    service.machines array List of service machines.
    machine objet Machine contained in the service machines list.
    machine.state chaîne Machine state, there are three possible states: processing, done and unavailable.
    machine.name chaîne Machine name.
    machine.workflow List List of workflow actions, each workflow action object contains three parameters: box, event and script.
    workflow.box chaîne Workflow action box.
    workflow.event chaîne Workflow action event.
    workflow.script chaîne Workflow action script uri.
    tags array Instance tags.
    boxes array List of boxes where each box object contains a service parameter. The service parameter can have one of these values: Linux Compute, Windows Compute and CloudFormation Service.
    uri chaîne Instance uri.
    environment chaîne Environment name.
    state chaîne Instance state, there are three possible states: processing, done and unavailable.
    bindings array List of instance bindings.
    binding objet Binding contained in the bindings list, each binding object contains the parameters: instance and name.
    id array Instance unique identifier.
    icon chaîne Instance icon uri.
    schema chaîne Instance schema uri.

    Response Body

    
       {
          "updated":"2014-03-23 16:12:25.219301",
          "operation":"poweron",
          "name":"PHP",
          "service":{
             "type":"Linux Compute",
             "id":"--service id--",
             "machines":[
                {
                   "state":"done",
                   "name":"--machine name--",
                   "workflow":[
    
                   ]
                }
             ]
          },
          "tags":[
             "Git",
             "Puppet",
             "GitHub",
             "environmentapache",
             "Web Framework"
          ],
          "boxes":[
             {
                "service":"Linux Compute"
             },
             {
                "service":"Linux Compute"
             },
             {
                "service":"Linux Compute"
             },
             {
                "service":"Linux Compute"
             }
          ],
          "uri":"/services/instances/i-rf79pl",
          "environment":"environmentapache",
          "state":"done",
          "id":"i-rf79pl",
          "icon":"images/platform/php.png"
       },
       {
          "updated":"2014-03-21 18:22:47.054005",
          "operation":"deploy",
          "name":"Wordpress",
          "service":{
             "type":"Linux Compute",
             "id":"--service id--",
             "machines":[
                {
                   "state":"processing",
                   "name":"--machine name--",
                   "workflow":[
                      {
                         "box":"chef_cookbook.chef_solo.Ruby",
                         "event":"install",
                         "script":"/services/blobs/download/52fe31e649bbcc830f342fc1/install"
                      },
                      {
                         "box":"chef_cookbook.chef_solo",
                         "event":"pre_install",
                         "script":"/services/blobs/download/52fe31c649bbcc830f342f85/pre_install"
                      },
                      {
                         "box":"chef_cookbook",
                         "event":"pre_install",
                         "script":"/services/blobs/download/52fe31c249bbcc830f342f7d/pre_install"
                      },
                      {
                         "box":"chef_cookbook.chef_solo",
                         "event":"configure",
                         "script":"/services/blobs/download/52fe31c749bbcc830f342f87/configure"
                      }
                   ]
                }
             ]
          },
          "tags":[
             "environment",
             "Chef",
             "Featured",
             "CMS",
             "Ruby"
          ],
          "boxes":[
             {
                "service":"Linux Compute"
             },
             {
                "service":"Linux Compute"
             },
             {
                "service":"Linux Compute"
             },
             {
                "service":"Linux Compute"
             }
          ],
          "uri":"--instance uri--",
          "environment":"environment",
          "state":"processing",
          "id":"--instance id--",
          "icon":"images/platform/wordpress.png"
       }
    ]
    

    Contacting Cloud Application Manager Support

    We’re sorry you’re having an issue in Cloud Application Manager. Please review the troubleshooting tips, or contact Cloud Application Manager support with details and screenshots where possible.

    For issues related to API calls, send the request body along with details related to the issue.

    In the case of a box error, share the box in the workspace that your organization and Cloud Application Manager can access and attach the logs.

    • Linux: SSH and locate the log at /var/log/elasticbox/elasticbox-agent.log
    • Windows: RDP into the instance to locate the log at ProgramDataElasticBoxLogselasticbox-agent.log

    Blobs API

    Manage Blobs

    Ressource Description
    POST /services/blobs/upload Uploads a file using multi-part form data.
    POST /services/blobs/upload/{file_name} Creates a blob from submitted data.
    GET /services/blobs/download/{file_id}/{file_name} Downloads a file uploaded previously.

    POST /services/blobs/upload

    Uploads a file using multi-part form data when you give these parameters in the request body: url, length, upload_date, and content_type.

    Normal Response Codes

    • 200

    Error Response Codes

    • Bad Request (400)
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Type Description
    url chaîne The URL of the uploaded file.
    length integer The file length in bytes.
    upload_date chaîne The upload date.
    content_type chaîne The content type of the file.
    {
       "url":"/services/blobs/download/533577cb7d0083310b7c9600/arrow.png",
       "upload_date":"2014-03-28 13:23:23.462060",
       "length":1287,
       "content_type":"image/png"
    }
    

    POST /services/blobs/upload/{file_name}

    Creates a blob from submitted data when you give the file name.

    Normal Response Codes

    • 200

    Error Response Codes

    • Bad request (400)

    Request Parameters

    Parameter Type Description
    tags chaîne Box tags.
    bindings chaîne List of Box bindings.
    binding objet Binding contained in the bindings list, each binding have a box and a name.
    owner chaîne Box owner, the user name for a personal workspace and the workspace name for a team workspace.
    nom chaîne Box name.
    description chaîne Box description.
    service chaîne Required. Can be one of these types: Linux Compute, Windows Compute, CloudFormation Service.
    icon chaîne Icon url.
    schema chaîne Box schema.
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Type Description
    url chaîne The URL of the uploaded file.
    length integer The file length in bytes.
    upload_date chaîne The upload date.
    content_type chaîne The content type of the file.
    {
       "url":"/services/blobs/download/53357ac57d0083310b7c960b/miblob",
       "upload_date":"2014-03-28 13:36:05.227905",
       "length":143951,
       "content_type":"multipart/form-data"
    }
    

    GET /services/blobs/download/{file_id}/{file_name}

    Downloads a file uploaded previously when you give the file_id and the file_name. You can get the full download URL from the response body of the file upload request.

    Normal Response Codes

    • 200

    Error Response Codes

    • Bad Request (400)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Type Description
    url chaîne The URL of the uploaded file.
    length integer The file length in bytes.
    upload_date chaîne The upload date.
    content_type chaîne The content type of the file.

    Contacting Cloud Application Manager Support

    We’re sorry you’re having an issue in Cloud Application Manager. Please review the troubleshooting tips, or contact Cloud Application Manager support with details and screenshots where possible.

    For issues related to API calls, send the request body along with details related to the issue.

    In the case of a box error, share the box in the workspace that your organization and Cloud Application Manager can access and attach the logs.

    • Linux: SSH and locate the log at /var/log/elasticbox/elasticbox-agent.log
    • Windows: RDP into the instance to locate the log at ProgramDataElasticBoxLogselasticbox-agent.log

    Boxes API

    Manage and perform actions on boxes.

    Create or List Boxes

    Ressource Description
    GET /services/boxes Gets the list of boxes that are accessible in the personal workspace.
    POST /services/boxes Creates a new box.

    Perform Box Operations

    Ressource Description
    GET /services/boxes/{box_id} Fetches an existing box.
    PUT /services/boxes/{box_id} Updates an existing box.
    DELETE /services/box/{box_id} Deletes an existing box.
    GET /services/boxes/{box_id}/stack Gets the box stack.
    GET /services/boxes/{box_id}/bindings Gets the box bindings.
    GET /services/boxes/{box_id}/versions Get the list of box versions.
    PUT /services/boxes/{box_id}/diff Get the diff between two boxes.

    CloudFormation Box

    The Cloud Application Manager CloudFormation box runs on the AWS CloudFormation service. It lets you create and customize templates that you can launch as a single stack of combined services in AWS. Manage CloudFormation configurations in Cloud Application Manager using these API actions.

    GET /services/boxes

    Gets boxes that are accessible in the personal workspace of the authenticated user.

    Normal Response Codes:

    • 200

    Error Response Codes:

    • Bad Request (400)

    Request Headers

    Parameter Style Type Description
    ids (optional) plain chaîne Comma-separate list of boxes IDs
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    GET /services/boxes?ids=05b76b08-5238-4e05-ae5f-8ea8afe00378
    

    Response Parameters

    Parameter Style Type Description
    visibility plain chaîne Indicates at what level the box is visible. By default, boxes are visible to the workspace they're created in. Can have one of these values:
  • public: Visible to Cloud Application Manager users across all organizations.
  • organization: Visible to all users in the organization where the box was created.
  • workspace: By default, the box is visible only to members of the workspace where it was created.
  • organization plain chaîne Organization to which the box belongs.
    updated plain chaîne Date of the last update.
    description plain chaîne Box description.
    requirements plain array Box requirements.
    variables plain array List of box variables, each variable object contains the parameters: type, name and value.
    created plain chaîne Creation date.
    uri plain chaîne Box uri.
    id plain array Box unique identificator.
    schema plain chaîne Box schema uri.
    members plain array List of Box members.
    owner plain chaîne Box owner.
    icon plain chaîne Box icon uri.
    events plain array List of Box events, there may be nine event lists: configure, dispose, install, pre_configure, pre_dispose, pre_install, pre_start, pre_stop, start and stop.
    event plain objet Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path.
    nom plain chaîne Box name.
    [
      {
        "schema": "http://elasticbox.net/schemas/boxes/script",
        "updated": "2015-05-27 08:25:49.363170",
        "automatic_updates": "off",
        "requirements": [
          "linux"
        ],
        "description": "An open source, BSD licensed, advanced key-value store",
        "created": "2015-04-30 14:09:40.247173",
        "deleted": null,
        "variables": [
          {
            "required": false,
            "type": "Port",
            "name": "redisport",
            "value": "6379",
            "visibility": "public"
          },
          {
            "name": "CHEF_DEFAULT_RB",
            "required": false,
            "value": "/services/blobs/download/554237a3da3116443909eb79/default.rb",
            "visibility": "public",
            "scope": "chef_cookbook",
            "type": "File"
          },
          {
            "name": "CHEF_METADATA_RB",
            "required": false,
            "value": "/services/blobs/download/554237a3da3116443909eb7b/metadata.rb",
            "visibility": "public",
            "scope": "chef_cookbook",
            "type": "File"
          },
          {
            "name": "COOKBOOK_LIST",
            "required": false,
            "value": "/services/blobs/download/554237a3da3116443909eb7d/Cookbooks.config",
            "visibility": "public",
            "scope": "chef_solo",
            "type": "File"
          },
          {
            "name": "CHEF_SOLO_JSON",
            "required": false,
            "value": "/services/blobs/download/554237a3da3116443909eb7f/solo.json",
            "visibility": "public",
            "scope": "chef_solo",
            "type": "File"
          },
          {
            "automatic_updates": "off",
            "name": "chef_cookbook",
            "required": false,
            "visibility": "public",
            "value": "391e2946-552d-47b3-8551-d414ed47a97f",
            "type": "Box"
          },
          {
            "automatic_updates": "off",
            "name": "chef_solo",
            "required": false,
            "visibility": "public",
            "value": "02d1c985-04fb-41a5-83c0-cff13f02a80b",
            "type": "Box"
          }
        ],
        "uri": "/services/boxes/7e846aa1-d490-4b8a-a2a1-555407a90105",
        "visibility": "public",
        "name": "Redis",
        "id": "7e846aa1-d490-4b8a-a2a1-555407a90105",
        "members": [],
        "owner": "public",
        "organization": "public",
        "events": {},
        "draft_from": "aa5a019a-5dd6-4669-a591-ec52783b123e",
        "icon": "images/platform/redis.png"
      },
      {
        "schema": "http://elasticbox.net/schemas/boxes/script",
        "updated": "2015-05-27 08:25:49.536624",
        "automatic_updates": "off",
        "requirements": [
          "linux"
        ],
        "description": "A semantic personal publishing platform with a focus on aesthetics, web standards, and usability",
        "created": "2015-04-30 14:09:40.247173",
        "deleted": null,
        "variables": [
          {
            "required": false,
            "type": "Port",
            "name": "http",
            "value": "80",
            "visibility": "public"
          },
          {
            "required": false,
            "type": "Port",
            "name": "https",
            "value": "443",
            "visibility": "public"
          },
          {
            "automatic_updates": "off",
            "name": "chef_cookbook",
            "required": false,
            "visibility": "public",
            "value": "391e2946-552d-47b3-8551-d414ed47a97f",
            "type": "Box"
          },
          {
            "name": "CHEF_DEFAULT_RB",
            "required": false,
            "value": "/services/blobs/download/554237a3da3116443909ebc7/default.rb",
            "visibility": "public",
            "scope": "chef_cookbook",
            "type": "File"
          },
          {
            "name": "CHEF_METADATA_RB",
            "required": false,
            "value": "/services/blobs/download/554237a3da3116443909ebc9/metadata.rb",
            "visibility": "public",
            "scope": "chef_cookbook",
            "type": "File"
          },
          {
            "name": "COOKBOOK_LIST",
            "required": false,
            "value": "/services/blobs/download/554237a4da3116443909ebcb/Cookbooks.config",
            "visibility": "public",
            "scope": "chef_solo",
            "type": "File"
          },
          {
            "name": "CHEF_SOLO_JSON",
            "required": false,
            "value": "/services/blobs/download/554237a4da3116443909ebcd/solo.json",
            "visibility": "public",
            "scope": "chef_solo",
            "type": "File"
          },
          {
            "automatic_updates": "off",
            "name": "chef_solo",
            "required": false,
            "visibility": "public",
            "value": "02d1c985-04fb-41a5-83c0-cff13f02a80b",
            "type": "Box"
          }
        ],
        "uri": "/services/boxes/74325e01-eefd-4108-abad-b42791960f7e",
        "visibility": "public",
        "name": "Wordpress",
        "id": "74325e01-eefd-4108-abad-b42791960f7e",
        "members": [],
        "owner": "public",
        "organization": "public",
        "events": {},
        "draft_from": "412f1e21-02cb-4c51-aafd-7e0b1eff6122",
        "icon": "images/platform/wordpress.png"
      }
    ]
    

    POST/services/boxes

    Creates a new box in the personal workspace and gets the created box.

    Normal Response Codes

    • 200

    Error Response Codes

    • Invalid Data (400)
    • Conflict (409)

    Request parameters

    Parameter Style Type Description
    requirements plain array Box requirements.
    owner plain chaîne Box owner, the user name for a personal workspace and the workspace name for a team workspace.
    visibility plain chaîne Indicates at what level the box is visible. By default, boxes are visible to the workspace they're created in. Can have one of these values:
  • public: Visible to Cloud Application Manager users across all organizations.
  • organization: Visible to all users in the organization where the box was created.
  • workspace: By default, the box is visible only to members of the workspace where it was created.
  • nom plain chaîne Box name.
    description plain chaîne Box description.
    icon plain chaîne Icon url.
    schema plain chaîne Box schema.

    Response parameters

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
        "owner": "project",
        "schema":"http://elasticbox.net/schemas/boxes/script",
        "requirements":["linux"],
        "automatic_updates":"off",
        "name":"Wordpress Starter Box",
        "description":"Wordpress Started for our showcase"
    }
    

    Response parameters

    Parameter Style Type Description
    visibility plain chaîne Indicates at what level the box is visible. By default, boxes are visible to the workspace they're created in. Can have one of these values:
  • public: Visible to Cloud Application Manager users across all organizations.
  • organization: Visible to all users in the organization where the box was created.
  • workspace: By default, the box is visible only to members of the workspace where it was created.
  • organization plain chaîne Organization to which the box belongs.
    updated plain chaîne Date of the last update.
    description plain chaîne Box description.
    requirements plain array Box requirements.
    variables plain array List of box variables, each variable object contains the parameters: type, name and value.
    created plain chaîne Creation date.
    uri plain chaîne Box uri.
    id plain array Box unique identificator.
    schema plain chaîne Box schema uri.
    members plain array List of Box members.
    owner plain chaîne Box owner.
    icon plain chaîne Box icon uri.
    events plain array List of Box events, there may be nine event lists: configure, dispose, install, pre_configure, pre_dispose, pre_install, pre_start, pre_stop, start and stop.
    event plain objet Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path.
    nom plain chaîne Box name.
    {
      "updated": "2015-07-02 16:20:35.534878",
      "automatic_updates": "off",
      "description": "Wordpress Started for our showcase",
      "deleted": null,
      "variables": [],
      "visibility": "workspace",
      "members": [],
      "owner": "project",
      "id": "60cef61c-73dc-41d9-a32f-70f49a509c66",
      "requirements": [
        "linux"
      ],
      "name": "Wordpress Starter Box",
      "created": "2015-07-02 16:20:35.534878",
      "uri": "/services/boxes/60cef61c-73dc-41d9-a32f-70f49a509c66",
      "organization": "elasticbox",
      "events": {},
      "schema": "http://elasticbox.net/schemas/boxes/script"
    }
    

    GET /services/boxes/{box_id}

    Fetches an existing box, requires the specified id box_id.

    Normal Response Codes

    • 200

    Error Response Codes

    • Forbidden (403)

    • Not Found (404)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Style Type Description
    visibility plain chaîne Indicates at what level the box is visible. By default, boxes are visible to the workspace they're created in. Can have one of these values:
  • public: Visible to Cloud Application Manager users across all organizations.
  • organization: Visible to all users in the organization where the box was created.
  • workspace: By default, the box is visible only to members of the workspace where it was created.
  • organization plain chaîne Organization to which the box belongs.
    updated plain chaîne Date of the last update.
    description plain chaîne Box description.
    requirements plain array Box requirements.
    variables plain array List of box variables, each variable object contains the parameters: type, name and value.
    created plain chaîne Creation date.
    uri plain chaîne Box uri.
    id plain array Box unique identificator.
    schema plain chaîne Box schema uri.
    members plain array List of Box members.
    owner plain chaîne Box owner.
    icon plain chaîne Box icon uri.
    events plain array List of Box events, there may be nine event lists: configure, dispose, install, pre_configure, pre_dispose, pre_install, pre_start, pre_stop, start and stop.
    event plain objet Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path.
    nom plain chaîne Box name.
    {
      "schema": "http://elasticbox.net/schemas/boxes/script",
      "updated": "2015-07-02 16:20:35.534878",
      "automatic_updates": "off",
      "requirements": [
        "linux"
      ],
      "description": "Wordpress Started for our showcase",
      "created": "2015-07-02 16:20:35.534878",
      "deleted": null,
      "variables": [],
      "uri": "/services/boxes/60cef61c-73dc-41d9-a32f-70f49a509c66",
      "visibility": "workspace",
      "events": {},
      "members": [],
      "owner": "project",
      "organization": "elasticbox",
      "id": "60cef61c-73dc-41d9-a32f-70f49a509c66",
      "name": "Wordpress Starter Box"
    }
    

    PUT /services/boxes/{box_id}

    Requires the box ID to update an existing box. The request body must contain the box object and can only update the following fields: files, variables, ports, requirements, description, icon, name, events, and members.

    Normal Response Codes

    • 200

    Error Response Codes

    • Invalid Data (400)
    • Forbidden (403)
    • Not Found (404)

    Request Headers

    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Request Parameters

    Parameter Style Type Description
    updated plain chaîne Date of the last update.
    description plain chaîne Box description.
    requirements plain array Box requirements.
    variables plain array List of box variables, each variable object contains the parameters: type, name and value.
    created plain chaîne Creation date.
    uri plain chaîne Box uri.
    id plain array Box unique identificator.
    schema plain chaîne Box schema uri.
    members plain array List of Box members.
    owner plain chaîne Box owner.
    icon plain chaîne Box icon uri.
    events plain array List of Box events, there may be nine event lists: configure, dispose, install, pre_configure, pre_dispose, pre_install, pre_start, pre_stop, start and stop.
    event plain objet Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path.
    nom plain chaîne Box name.
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
        "schema":"http://elasticbox.net/schemas/boxes/script",
        "updated":"2015-07-02 16:23:46.702968",
        "automatic_updates":"off",
        "requirements":[
            "linux"
        ],
        "description":"Wordpress Started box",
        "created":"2015-07-02 16:20:15.098554",
        "deleted":null,
        "variables":[
            {
                "required":false,
                "type":"Text",
                "name":"Text_var",
                "value":"Default value",
                "visibility":"public"
    
            },
            {
                "required":true,
                "type":"Port",
                "name":"Port_variable",
                "value":"80",
                "visibility":"public"
    
            },{
                "automatic_updates":"off",
                "name":"Wordpress_base",
                "required":false,
                "value":"412f1e21-02cb-4c51-aafd-7e0b1eff6122",
                "visibility":"internal",
                "type":"Box"
    
            },
            {
                "name":"Binding_db",
                "type":"Binding",
                "value":"2a7a5f6b-280d-47de-afaa-65db5dd85816",
                "visibility":"public"
    
            }
            ],
            "uri":"/services/boxes/9192cb3e-04e2-4c50-b8a5-a25c980479d4",
            "visibility":"workspace",
            "events":{},
            "members":[],
            "owner":"project",
            "organization":"elasticbox",
            "id":"60cef61c-73dc-41d9-a32f-70f49a509c66",
            "name":"Wordpress Starter Box"
    }
    
    

    Response Parameters

    Parameter Style Type Description
    visibility plain chaîne Indicates at what level the box is visible. By default, boxes are visible to the workspace they're created in. Can have one of these values:
  • public: Visible to Cloud Application Manager users across all organizations.
  • organization: Visible to all users in the organization where the box was created.
  • workspace: By default, the box is visible only to members of the workspace where it was created.
  • organization plain chaîne Organization to which the box belongs.
    updated plain chaîne Date of the last update.
    description plain chaîne Box description.
    requirements plain array Box requirements.
    variables plain array List of box variables, each variable object contains the parameters: type, name and value.
    created plain chaîne Creation date.
    uri plain chaîne Box uri.
    id plain array Box unique identificator.
    schema plain chaîne Box schema uri.
    members plain array List of Box members.
    owner plain chaîne Box owner.
    icon plain chaîne Box icon uri.
    events plain array List of Box events, there may be nine event lists: configure, dispose, install, pre_configure, pre_dispose, pre_install, pre_start, pre_stop, start and stop.
    event plain objet Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path.
    nom plain chaîne Box name.
    {
      "updated": "2015-07-02 16:28:13.181040",
      "automatic_updates": "off",
      "requirements": [
        "linux"
      ],
      "description": "Wordpress Started box",
      "name": "Wordpress Starter Box",
      "created": "2015-07-02 16:20:35.534878",
      "deleted": null,
      "variables": [
        {
          "required": false,
          "type": "Text",
          "name": "Text_var",
          "value": "Default value",
          "visibility": "public"
        },
        {
          "required": true,
          "type": "Port",
          "name": "Port_variable",
          "value": "80",
          "visibility": "public"
        },
        {
          "value": "412f1e21-02cb-4c51-aafd-7e0b1eff6122",
          "automatic_updates": "off",
          "name": "Wordpress_base",
          "required": false,
          "type": "Box",
          "visibility": "internal"
        },
        {
          "value": "2a7a5f6b-280d-47de-afaa-65db5dd85816",
          "required": false,
          "type": "Binding",
          "name": "Binding_db",
          "visibility": "public"
        }
      ],
      "uri": "/services/boxes/60cef61c-73dc-41d9-a32f-70f49a509c66",
      "visibility": "workspace",
      "id": "60cef61c-73dc-41d9-a32f-70f49a509c66",
      "members": [],
      "owner": "project",
      "organization": "elasticbox",
      "events": {},
      "schema": "http://elasticbox.net/schemas/boxes/script"
    }
    

    DELETE /services/boxes/{box_id}

    Deletes an existing box, requires the specified id box_id.

    Normal Response Codes

    • 204

    Error Response Codes

    • Forbidden (403)
    • Not Found (404)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    GET /services/boxes/{box_id}/stack

    Gets the box stack. The box stack is a list of boxes. All boxes that are a box variable of the given box are included. The first box is always the given box.

    Normal Response Codes

    • 200

    Error Response Codes

    • Bad Request (400)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Style Type Description
    visibility plain chaîne Indicates at what level the box is visible. By default, boxes are visible to the workspace they're created in. Can have one of these values:
  • public: Visible to Cloud Application Manager users across all organizations.
  • organization: Visible to all users in the organization where the box was created.
  • workspace: By default, the box is visible only to members of the workspace where it was created.
  • organization plain chaîne Organization to which the box belongs.
    updated plain chaîne Date of the last update.
    description plain chaîne Box description.
    tags plain array Box tags.
    variables plain array List of box variables, each variable object contains the parameters: type, name and value.
    created plain chaîne Creation date.
    uri plain chaîne Box uri.
    id plain array Box unique identificator.
    schema plain chaîne Box schema uri.
    members plain array List of Box members.
    owner plain chaîne Box owner.
    icon plain chaîne Box icon uri.
    events plain array List of Box events, there may be nine event lists: configure, dispose, install, pre_configure, pre_dispose, pre_install, pre_start, pre_stop, start and stop.
    event plain objet Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path.
    nom plain chaîne Box name.
    
    [
      {
        "updated": "2015-05-27 08:25:49.655298",
        "automatic_updates": "off",
        "requirements": [
          "linux"
        ],
        "description": "Cookbook with a simple recipe",
        "icon": "images/platform/chef-cookbook.png",
        "created": "2015-04-30 14:09:40.247173",
        "deleted": null,
        "variables": [
          {
            "required": false,
            "type": "Text",
            "name": "CHEF_COOKBOOK_NAME",
            "value": "elasticbox",
            "visibility": "public"
          },
          {
            "required": false,
            "type": "File",
            "name": "CHEF_DEFAULT_RB",
            "value": "/services/blobs/download/554237a3da3116443909eb9f/default.rb",
            "visibility": "public"
          },
          {
            "required": false,
            "type": "File",
            "name": "CHEF_METADATA_RB",
            "value": "/services/blobs/download/554237a3da3116443909eba1/metadata.rb",
            "visibility": "public"
          }
        ],
        "uri": "/services/boxes/31689659-fed1-49f0-ac31-379d192751be",
        "visibility": "public",
        "name": "Chef Cookbook",
        "version": {
          "box": "391e2946-552d-47b3-8551-d414ed47a97f",
          "description": "Initial Cloud Application Manager Version",
          "workspace": "public",
          "number": {
            "major": 1,
            "minor": 0,
            "patch": 0
          }
        },
        "id": "31689659-fed1-49f0-ac31-379d192751be",
        "members": [],
        "owner": "public",
        "organization": "public",
        "events": {
          "pre_configure": {
            "url": "/services/blobs/download/554237a3da3116443909eb9d/pre_configure",
            "upload_date": "2015-04-30 14:09:39.701080",
            "length": 252,
            "destination_path": "scripts",
            "content_type": null
          }
        },
        "schema": "http://elasticbox.net/schemas/boxes/script"
      },
            ....
      {
        "updated": "2015-05-27 08:25:49.687260",
        "automatic_updates": "off",
        "requirements": [
          "linux"
        ],
        "description": "Opscode Chef client",
        "icon": "images/platform/chef.png",
        "created": "2015-04-30 14:09:40.247173",
        "deleted": null,
        "variables": [
          {
            "required": false,
            "type": "File",
            "name": "CHEF_SOLO_JSON",
            "value": "/services/blobs/download/554237a3da3116443909ebbb/solo.json",
            "visibility": "public"
          },
          {
            "required": false,
            "type": "File",
            "name": "CHEF_SOLO_RB",
            "value": "/services/blobs/download/554237a3da3116443909ebbd/solo.rb",
            "visibility": "public"
          },
          {
            "required": false,
            "type": "File",
            "name": "COOKBOOK_LIST",
            "value": "/services/blobs/download/554237a3da3116443909ebbf/Cookbooks.config",
            "visibility": "public"
          }
        ],
        "uri": "/services/boxes/860e943e-bb69-416c-ba6e-06099dd5f7ea",
        "visibility": "public",
        "name": "Chef Solo",
        "version": {
          "box": "02d1c985-04fb-41a5-83c0-cff13f02a80b",
          "description": "Initial Cloud Application Manager Version",
          "workspace": "public",
          "number": {
            "major": 1,
            "minor": 0,
            "patch": 0
          }
        },
        "id": "860e943e-bb69-416c-ba6e-06099dd5f7ea",
        "members": [],
        "owner": "public",
        "organization": "public",
        "events": {
          "pre_install": {
            "url": "/services/blobs/download/554237a3da3116443909ebb7/pre_install",
            "upload_date": "2015-04-30 14:09:39.904687",
            "length": 1033,
            "destination_path": "scripts",
            "content_type": null
          },
          "pre_configure": {
            "url": "/services/blobs/download/554237a3da3116443909ebb9/pre_configure",
            "upload_date": "2015-04-30 14:09:39.908203",
            "length": 182,
            "destination_path": "scripts",
            "content_type": null
          }
        },
        "schema": "http://elasticbox.net/schemas/boxes/script"
      }
    ]
    
    

    GET /services/boxes/{box_id}/bindings

    Gets a list of box objects that are bindings of the request box, requires the specified id box_id.

    Normal Response Codes

    • 200

    Error Response Codes

    • Bad Request (400)
    • Requête
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Style Type Description
    uri plain chaîne Box uri.
    id plain array Box unique identificator.
    icon plain chaîne Box icon uri.
    nom plain chaîne Box name.
    [
      {
        "id": "2a7a5f6b-280d-47de-afaa-65db5dd85816",
        "uri": "/services/boxes/2a7a5f6b-280d-47de-afaa-65db5dd85816",
        "name": "MongoDB Server",
        "icon": "images/platform/mongodb.png"
      }
    ]
    

    GET /services/boxes/{box_id}/versions

    Gets a list of box versions, requires the specified id box_id. If the box is unversioned is the empty list.

    Normal Response Codes

    • 200

    Error Response Codes

    • Forbidden (403)
    • Not Found (404)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Style Type Description
    updated plain chaîne Date of the last update.
    description plain chaîne Box description.
    tags plain array Box tags.
    variables plain array List of box variables, each variable object contains the parameters: type, name and value.
    members plain array List of Box members.
    owner plain chaîne Box owner.
    id plain array Box unique identificator.
    icon plain chaîne Box icon uri.
    visibility plain chaîne Indicates at what level the box is visible. By default, boxes are visible to the workspace they're created in. Can have one of these values:
  • public: Visible to Cloud Application Manager users across all organizations.
  • organization: Visible to all users in the organization where the box was created.
  • workspace: By default, the box is visible only to members of the workspace where it was created.
  • organization plain chaîne Organization to which the box belongs.
    nom plain chaîne Box name.
    created plain chaîne Creation date.
    uri plain chaîne Box uri.
    version plain objet The box version object contains the parameters box, description and workspace.
    events plain array List of Box events, there may be nine event lists: configure, dispose, install, pre_configure, pre_dispose, pre_install, pre_start, pre_stop, start and stop.
    event plain objet Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path.
    schema plain chaîne Box schema uri.
    [
      {
        "schema": "http://elasticbox.net/schemas/boxes/script",
        "updated": "2015-07-02 16:28:13.181040",
        "automatic_updates": "off",
        "requirements": [
          "linux"
        ],
        "description": "Wordpress Started box",
        "created": "2015-07-02 16:36:30.325064",
        "deleted": null,
        "variables": [
          {
            "required": false,
            "type": "Text",
            "name": "Text_var",
            "value": "Default value",
            "visibility": "public"
          },
          {
            "required": true,
            "type": "Port",
            "name": "Port_variable",
            "value": "80",
            "visibility": "public"
          },
          {
            "automatic_updates": "off",
            "name": "Wordpress_base",
            "required": false,
            "value": "412f1e21-02cb-4c51-aafd-7e0b1eff6122",
            "visibility": "internal",
            "type": "Box"
          },
          {
            "required": false,
            "type": "Binding",
            "name": "Binding_db",
            "value": "2a7a5f6b-280d-47de-afaa-65db5dd85816",
            "visibility": "public"
          }
        ],
        "uri": "/services/boxes/ca197de8-25e1-4e9b-9d45-c99a049249fc",
        "visibility": "workspace",
        "events": {},
        "version": {
          "box": "60cef61c-73dc-41d9-a32f-70f49a509c66",
          "number": {
            "major": 0,
            "minor": 1,
            "patch": 0
          },
          "workspace": "operations",
          "description": "Initial version"
        },
        "members": [],
        "owner": "project",
        "organization": "elasticbox",
        "id": "ca197de8-25e1-4e9b-9d45-c99a049249fc",
        "name": "Wordpress Starter Box"
      }
    ]
    

    PUT /services/boxes/{box_id}/diff

    Compares a box to the submitted box, requires the specified id box_id.

    Normal Response Codes

    • 200

    Error Response Codes

    • Forbidden (403)
    • Not Found (404)

    Request parameters

    Parameter Style Type Description
    updated plain chaîne Date of the last update.
    description plain chaîne Box description.
    tags plain array Box tags.
    variables plain array List of box variables, each variable object contains the parameters: type, name and value.
    members plain array List of Box members.
    owner plain chaîne Box owner.
    id plain array Box unique identificator.
    icon plain chaîne Box icon uri.
    visibility plain chaîne Indicates at what level the box is visible. By default, boxes are visible to the workspace they're created in. Can have one of these values:
  • public: Visible to Cloud Application Manager users across all organizations.
  • organization: Visible to all users in the organization where the box was created.
  • workspace: By default, the box is visible only to members of the workspace where it was created.
  • organization plain chaîne Organization to which the box belongs.
    nom plain chaîne Box name.
    created plain chaîne Creation date.
    uri plain chaîne Box uri.
    version plain objet The box version object contains the parameters box, description and workspace.
    events plain array List of Box events, there may be nine event lists: configure, dispose, install, pre_configure, pre_dispose, pre_install, pre_start, pre_stop, start and stop.
    event plain objet Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path.
    schema plain chaîne Box schema uri.
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
      "updated": "2015-07-02 16:36:30.348041",
      "automatic_updates": "off",
      "requirements": [
        "linux",
        "new_requirement"
      ],
      "description": "Wordpress Started box proposal",
      "name": "Wordpress Starter Box",
      "created": "2015-07-02 16:20:35.534878",
      "deleted": null,
      "variables": [
        {
          "required": false,
          "type": "Text",
          "name": "Text_var",
          "value": "Default value",
          "visibility": "public"
        },
        {
          "required": true,
          "type": "Port",
          "name": "Port_variable_renamed",
          "value": "80",
          "visibility": "public"
        },
        {
          "automatic_updates": "off",
          "name": "Wordpress_base",
          "required": false,
          "value": "412f1e21-02cb-4c51-aafd-7e0b1eff6122",
          "visibility": "internal",
          "type": "Box"
        },
        {
          "required": false,
          "type": "Binding",
          "name": "Binding_db",
          "value": "2a7a5f6b-280d-47de-afaa-65db5dd85816",
          "visibility": "public"
        },
        {
          "required": false,
          "type": "Text",
          "name": "Text_var2",
          "value": "Default value",
          "visibility": "public"
        }
      ],
      "uri": "/services/boxes/60cef61c-73dc-41d9-a32f-70f49a509c66",
      "visibility": "workspace",
      "id": "60cef61c-73dc-41d9-a32f-70f49a509c66",
      "members": [],
      "owner": "project",
      "organization": "elasticbox",
      "events": {},
      "draft_from": "ca197de8-25e1-4e9b-9d45-c99a049249fc",
      "schema": "http://elasticbox.net/schemas/boxes/script"
    }
    
    

    Response parameters

    Parameter Style Type Description
    box_variables plain objet Differences in the box variables, the object contains a title and three lists: removed, added and changed.
    box_variables.removed plain array List of box variables removed, each variable object contains the parameters: type, name and value.
    box_variables.added plain array List of box variables added, each variable object contains the parameters: type, name and value.
    box_variables.changed plain array List of box variables changed, each variable object contains the parameters: type, name and value.
    box_details plain objet Differences in the box details, the object contains a title and three lists: removed, added and changed.
    box_profile_properties plain objet Differences in the box profile properties, the object contains a title and three lists: removed, added and changed. Available for Policy boxes.
    box_events plain array List of box events.
    changed plain boolean There have been changes between versions.
    {
      "box_profile_properties": {
        "removed": [],
        "added": [],
        "changed": []
      },
      "box_details": {
        "title": "Modified Box Details",
        "removed": [],
        "added": [],
        "changed": [
          {
            "new": "Wordpress Started box proposal",
            "name": "Description",
            "previous": "Wordpress Started box"
          },
          {
            "new": "linux, new_requirement",
            "name": "Requirements",
            "previous": "linux"
          }
        ]
      },
      "box_events": [],
      "box_variables": {
        "title": "Modified Variables",
        "removed": [
          {
            "required": true,
            "type": "Port",
            "name": "Port_variable",
            "value": "80",
            "visibility": "public"
          }
        ],
        "files_diff": [],
        "added": [
          {
            "required": true,
            "type": "Port",
            "name": "Port_variable_renamed",
            "value": "80",
            "visibility": "public"
          },
          {
            "required": false,
            "type": "Text",
            "name": "Text_var2",
            "value": "Default value",
            "visibility": "public"
          }
        ],
        "changed": []
      },
      "box_readme": [],
      "changed": true
    }
    

    Create and Launch a CloudFormation Box

    Create a CloudFormation box with template

    1. POST /services/boxes
      Creates a box of the CloudFormation service type. See example create a CloudFormation.

    2. GET /services/blobs/download/{file_id}/{file_name}
      Fetches contents from a given file or URL. See example create a CloudFormation, part 2.
      Submits a blank JSON template as a blob.

    3. POST /services/blobs/upload/{file_name}
      Creates a blob from template data submitted through a file or URL. Here template data is in the request body. See example create a CloudFormation, part 3.

    4. PUT /services/boxes/{box_id}
      Updates the CloudFormation box with the template. See example create a CloudFormation, part 4.

    Modify the CloudFormation Template

    1. POST /services/blobs/upload/{file_name}
      Creates a blob from modified template data. See example modify a CloudFormation.

    2. PUT /services/boxes/{box_id}
      Updates the CloudFormation box. See example modify a CloudFormation, part 2.

    Delete a CloudFormation Box

    1. DELETE /services/box/{box_id}
      Removes the CloudFormation box from the boxes catalog.

    Launch a CloudFormation Box

    1. POST /services/profiles
      This step is optional. Passes deployment settings in a new deployment profile to launch the box in the provider's infrastructure. See example launch a CloudFormation.

    2. POST /services/instances
      Creates a new instance of the CloudFormation box.

    Update a CloudFormation Stack in Real-Time

    1. POST /services/blobs/upload
      Uploads the modified template data. See example update a CloudFormation.

    2. PUT /services/instances/{instance_id}
      Updates the instance with the template changes. See example update a CloudFormation part 2.

    3. PUT /services/instances/{instance_id}/reconfigure
      Reconfigures the stack based on the changes. See example update a CloudFormation part 3.

    Example: Create a CloudFormation box with template

    1. POST https://cam.ctl.io/services/boxes/

    Creating a box of the CloudFormation service type.

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    {
        "owner": "operations",
        "schema":"http://elasticbox.net/schemas/boxes/cloudformation",
        "automatic_updates":"off",
        "name":"Wordpress Starter CF",
        "description":"Wordpress Started for our showcase"
    }
    

    Réponse

    {
        "updated": "2015-10-28 11:24:01.854958",
        "automatic_updates": "off",
        "description": "Wordpress Started for our showcase",
        "deleted": null,
        "variables": [],
        "visibility": "workspace",
        "members": [],
        "owner": "operations",
        "id": "262d4cbe-9ad9-4069-b6a8-76fda70a4d90",
        "requirements": [],
        "name": "Wordpress Starter CF",
        "created": "2015-10-28 11:24:01.854958",
        "uri": "/services/boxes/262d4cbe-9ad9-4069-b6a8-76fda70a4d90",
        "organization": "elasticbox",
        "type": "CloudFormation Service",
        "schema": "http://elasticbox.net/schemas/boxes/cloudformation"
    }
    
    

    2. GET https://cam.ctl.io/services/blobs/download/{blob_id}/file_name

    Fetches contents from a given URL. Once we have checked that the template is the right one, we could assign it to the CloudFormation box.

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Réponse

    {
       "AWSTemplateFormatVersion":"2010-09-09",
       "Description":"AWS CloudFormation Sample Template WordPress_Single_Instance_With_RDS: WordPress is web software you can use to create a beautiful website or blog. This template installs a single-instance WordPress deployment using an Amazon RDS database instance for storage. It demonstrates using the AWS CloudFormation bootstrap scripts to install packages and files at instance launch time. **WARNING** This template creates an Amazon EC2 instance and an Amazon RDS database instance. You will be billed for the AWS resources used if you create a stack from this template.",
       "Parameters":{
          "KeyName":{
             "Description":"Name of an existing EC2 KeyPair to enable SSH access to the instances",
             "Type":"String",
             "MinLength":"1",
             "MaxLength":"255",
             "AllowedPattern":"[\\x20-\\x7E]*",
             "ConstraintDescription":"can contain only ASCII characters."
          },
        ...
       }
    ...
    ...
    
       "Outputs":{
          "WebsiteURL":{
             "Value":{
                "Fn::Join":[
                   "",
                   [
                      "http://",
                      {
                         "Fn::GetAtt":[
                            "WebServer",
                            "PublicDnsName"
                         ]
                      },
                      "/wordpress"
                   ]
                ]
             },
             "Description":"WordPress Website"
          }
       }
    }
    

    3. POST https://cam.ctl.io/services/blobs/upload/template.json

    Another option is to create the template from the data submitted through a URL.

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
       "AWSTemplateFormatVersion":"2010-09-09",
       "Description":"AWS CloudFormation Sample Template WordPress_Single_Instance_With_RDS: WordPress is web software you can use to create a beautiful website or blog. This template installs a single-instance WordPress deployment using an Amazon RDS database instance for storage. It demonstrates using the AWS CloudFormation bootstrap scripts to install packages and files at instance launch time. **WARNING** This template creates an Amazon EC2 instance and an Amazon RDS database instance. You will be billed for the AWS resources used if you create a stack from this template.",
       "Parameters":{
          "KeyName":{
             "Description":"Name of an existing EC2 KeyPair to enable SSH access to the instances",
             "Type":"String",
             "MinLength":"1",
             "MaxLength":"255",
             "AllowedPattern":"[\\x20-\\x7E]*",
             "ConstraintDescription":"can contain only ASCII characters."
          },
        ...
       },
    ...
    ...
       "Outputs":{
          "WebsiteURL":{
             "Value":{
                "Fn::Join":[
                   "",
                   [
                      "http://",
                      {
                         "Fn::GetAtt":[
                            "WebServer",
                            "PublicDnsName"
                         ]
                      },
                      "/wordpress"
                   ]
                ]
             },
             "Description":"WordPress Website"
          }
       }
    }
    
    

    Réponse

    {
       "url":"/services/blobs/download/536a9e867d0083771808bacd/template.json",
       "upload_date":"2014-05-07 20:58:46.650140",
       "length":9739,
       "content_type":"text/x-shellscript"
    }
    

    4. PUT https://cam.ctl.io/services/boxes/{box_id}

    Finally we are going to update the CloudFormation box with one of the templates we have obtained in the last two steps.

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
        "schema": "http://elasticbox.net/schemas/boxes/cloudformation",
        "automatic_updates": "off",
        "requirements": [],
        "description": "Wordpress Started for our showcase",
        "deleted": null,
        "variables": [],
        "uri": "/services/boxes/262d4cbe-9ad9-4069-b6a8-76fda70a4d90",
        "visibility": "workspace",
        "members": [],
        "owner": "operations",
        "organization": "elasticbox",
        "type": "CloudFormation Service",
        "id": "262d4cbe-9ad9-4069-b6a8-76fda70a4d90",
        "name": "Wordpress Starter CF",
        "template": {
            "url": "/services/blobs/download/536a9e867d0083771808bacd/template.json"
        }
    }
    

    Réponse

    {
        "schema": "http://elasticbox.net/schemas/boxes/cloudformation",
        "updated": "2015-10-28 12:03:32.661399",
        "automatic_updates": "off",
        "requirements": [],
        "description": "Wordpress Started for our showcase",
        "created": "2015-10-28 11:24:01.854958",
        "deleted": null,
        "variables": [
            {
                "value": "",
                "type": "Text",
                "name": "KeyName",
                "visibility": "public"
            },
            {
                "value": "",
                "type": "Text",
                "name": "SourceCidrForRDP",
                "visibility": "public"
            },
            {
                "value": "m1.large",
                "type": "Text",
                "name": "InstanceType",
                "visibility": "public"
            }
        ],
        "uri": "/services/boxes/262d4cbe-9ad9-4069-b6a8-76fda70a4d90",
        "visibility": "workspace",
        "template": {
            "url": "/services/blobs/download/536a9e867d0083771808bacd/template.json"
        },
        "members": [],
        "owner": "operations",
        "organization": "elasticbox",
        "type": "CloudFormation Service",
        "id": "262d4cbe-9ad9-4069-b6a8-76fda70a4d90",
        "name": "Wordpress Starter CF"
    }
    

    Example: Modify the CloudFormation Template

    1. POST http://cam.ctl.io/services/blobs/upload/template.json

    Creates a blob from modified template data.

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
        "AWSTemplateFormatVersion": "2010-09-09",
        "Description": "AWS CloudFormation Sample Template WordPress_Single_Instance_With_RDS: WordPress is web software you can use to create a beautiful website or blog. This template installs a single-instance WordPress deployment using an Amazon RDS database instance for storage. It demonstrates using the AWS CloudFormation bootstrap scripts to install packages and files at instance launch time. **WARNING** This template creates an Amazon EC2 instance and an Amazon RDS database instance. You will be billed for the AWS resources used if you create a stack from this template.",
        "Parameters": {
            "KeyName": {
                "Description": "Name of an existing EC2 KeyPair to enable SSH access to the instances",
                "Type": "String",
                "MinLength": "1",
                "MaxLength": "255",
                "AllowedPattern": "[\\x20-\\x7E]*",
                "ConstraintDescription": "can contain only ASCII characters."
            },
           ...
        },
    …
    …
        "Outputs": {
            "WebsiteURL": {
                "Value": {
                    "Fn::Join": [
                        "",
                        [
                            "http://",
                            {
                                "Fn::GetAtt": [
                                    "WebServer",
                                    "PublicDnsName"
                                ]
                            },
                            "/wordpress"
                        ]
                    ]
                },
                "Description": "WordPress Website"
            }
        }
    }
    

    Réponse

    {
       "url":"/services/blobs/download/536bd5619ac37b2f70318a87/template.json",
       "upload_date":"2014-05-08 19:05:05.761144",
       "length":15922,
       "content_type":"text/x-shellscript"
    }
    

    2. PUT http://cam.ctl.io/services/boxes/{box_id}

    Updates the CloudFormation box.

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
        "schema": "http://elasticbox.net/schemas/boxes/cloudformation",
        "automatic_updates": "off",
        "requirements": [],
        "description": "Wordpress Started for our showcase",
        "deleted": null,
        "variables": [],
        "uri": "/services/boxes/262d4cbe-9ad9-4069-b6a8-76fda70a4d90",
        "visibility": "workspace",
        "members": [],
        "owner": "operations",
        "organization": "elasticbox",
        "type": "CloudFormation Service",
        "id": "262d4cbe-9ad9-4069-b6a8-76fda70a4d90",
        "name": "Wordpress Starter CF",
        "template": {
            "url": "//services/blobs/download/536bd5619ac37b2f70318a87/template.json"
        }
    }
    

    Réponse

    {
        "schema": "http://elasticbox.net/schemas/boxes/cloudformation",
        "updated": "2015-10-28 12:03:32.661399",
        "automatic_updates": "off",
        "requirements": [],
        "description": "Wordpress Started for our showcase",
        "created": "2015-10-28 11:24:01.854958",
        "deleted": null,
        "variables": [
            {
                "value": "",
                "type": "Text",
                "name": "KeyName",
                "visibility": "public"
            },
            {
                "value": "",
                "type": "Text",
                "name": "SourceCidrForRDP",
                "visibility": "public"
            },
            {
                "value": "m1.large",
                "type": "Text",
                "name": "InstanceType",
                "visibility": "public"
            }
        ],
        "uri": "/services/boxes/262d4cbe-9ad9-4069-b6a8-76fda70a4d90",
        "visibility": "workspace",
        "template": {
            "url": "/services/blobs/download/536bd5619ac37b2f70318a87/template.json"
        },
        "members": [],
        "owner": "operations",
        "organization": "elasticbox",
        "type": "CloudFormation Service",
        "id": "262d4cbe-9ad9-4069-b6a8-76fda70a4d90",
        "name": "Wordpress Starter CF"
    }
    

    Example: Launch a CloudFormation Box

    1. POST https://cam.ctl.io/services/instances

    Creates a new instance of the CloudFormation box.

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
      "schema": "http://elasticbox.net/schemas/deploy-instance-request",
      "owner": "operations",
      "name": "CF WordPress 2",
      "box": {
        "id": "91645eed-173f-4aac-a713-69c6be7582fe",
        "variables": [
    
        ]
      },
      "instance_tags": [
    
      ],
      "automatic_updates": "off",
      "policy_box": {
        "id": "91645eed-173f-4aac-a713-69c6be7582fe",
        "variables": [
          {
            "name": "provider_id",
            "value": "7e841966-1dec-4460-a981-1db4e1eec10c",
            "type": "Text"
          },
          {
            "name": "location",
            "value": "ap-northeast-1",
            "type": "Text"
          }
        ]
      }
    }
    

    Réponse

    {
      "box": "91645eed-173f-4aac-a713-69c6be7582fe",
      "policy_box": {
        "profile": {
          "location": "ap-northeast-1",
          "schema": "http://elasticbox.net/schemas/aws/cloudformation/profile"
        },
        "schema": "http://elasticbox.net/schemas/boxes/cloudformation",
        "updated": "2015-10-28 13:46:55.247211",
        "automatic_updates": "off",
        "requirements": [
    
        ],
        "description": "CF test",
        "created": "2015-10-27 12:11:24.734064",
        "deleted": null,
        "variables": [
          {
            "required": false,
            "type": "Binding",
            "name": "Binding",
            "value": "5030fc49-773a-42fa-b569-c551e4f90d77",
            "visibility": "private"
          }
        ],
        "provider_id": "7e841966-1dec-4460-a981-1db4e1eec10c",
        "visibility": "workspace",
        "members": [
    
        ],
        "template": {
          "url": "/services/blobs/download/5630d1cf14841250525226a6/template.json",
          "upload_date": "2015-10-28 13:46:55.186875",
          "length": 104,
          "content_type": "text/x-shellscript"
        },
        "owner": "operations",
        "organization": "elasticbox",
        "type": "CloudFormation Service",
        "id": "91645eed-173f-4aac-a713-69c6be7582fe",
        "name": "CF WordPress 2"
      },
      "updated": "2015-10-28 13:47:15.567441",
      "automatic_updates": "off",
      "name": "CF WordPress 2",
      "service": {
        "type": "CloudFormation Service",
        "id": "eb-5cn45",
        "machines": [
    
        ]
      },
      "tags": [
    
      ],
      "deleted": null,
      "variables": [
    
      ],
      "created": "2015-10-28 13:47:15.567441",
      "state": "processing",
      "uri": "/services/instances/i-ywf1hu",
      "boxes": [
        {
          "schema": "http://elasticbox.net/schemas/boxes/cloudformation",
          "updated": "2015-10-28 13:46:55.247211",
          "automatic_updates": "off",
          "requirements": [
    
          ],
          "description": "CF test",
          "created": "2015-10-27 12:11:24.734064",
          "deleted": null,
          "variables": [
            {
              "required": false,
              "type": "Binding",
              "name": "Binding",
              "value": "5030fc49-773a-42fa-b569-c551e4f90d77",
              "visibility": "private"
            }
          ],
          "visibility": "workspace",
          "members": [
    
          ],
          "template": {
            "url": "/services/blobs/download/5630d1cf14841250525226a6/template.json",
            "upload_date": "2015-10-28 13:46:55.186875",
            "length": 104,
            "content_type": "text/x-shellscript"
          },
          "owner": "operations",
          "organization": "elasticbox",
          "type": "CloudFormation Service",
          "id": "91645eed-173f-4aac-a713-69c6be7582fe",
          "name": "CF WordPress 2"
        }
      ],
      "members": [
    
      ],
      "bindings": [
    
      ],
      "owner": "operations",
      "operation": {
        "event": "deploy",
        "workspace": "operations",
        "created": "2015-10-28 13:47:15.564698"
      },
      "schema": "http://elasticbox.net/schemas/instance",
      "id": "i-ywf1hu",
      "icon": null
    }
    

    Example: Update a CloudFormation Stack in Real-Time

    1. POST http://cam.ctl.io/services/blobs/upload/simple_template.json

    Uploads the modified template data.

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
        "Resources" : {
            "HelloBucket" : {
                "Type" : "AWS::S3::Bucket"
            }
        }
    }
    
    

    Réponse

    {
        "url": "/services/blobs/download/5630d61d14841250525226aa/simple_template.json",
        "upload_date": "2015-10-28 14:05:17.752627",
        "length": 0,
        "content_type": "application/json"
    }
    

    2. PUT http://cam.ctl.io/services/instances/{instance_id}

    Updates the instance with the template changes.

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    {
      "box": "91645eed-173f-4aac-a713-69c6be7582fe",
      "bindings": [
    
      ],
      "updated": "2015-10-28 13:48:24.367626",
      "automatic_updates": "off",
      "name": "CF WordPress 2",
      "service": {
        "type": "CloudFormation Service",
        "id": "eb-5cn45",
        "machines": [
    
        ]
      },
      "tags": [
    
      ],
      "deleted": null,
      "policy_box": {
        "profile": {
          "location": "ap-northeast-1",
          "schema": "http://elasticbox.net/schemas/aws/cloudformation/profile"
        },
        "updated": "2015-10-28 13:46:55.247211",
        "automatic_updates": "off",
        "requirements": [
    
        ],
        "description": "CF test",
        "created": "2015-10-27 12:11:24.734064",
        "deleted": null,
        "variables": [
          {
            "required": false,
            "type": "Binding",
            "name": "Binding",
            "value": "5030fc49-773a-42fa-b569-c551e4f90d77",
            "visibility": "private"
          }
        ],
        "provider_id": "7e841966-1dec-4460-a981-1db4e1eec10c",
        "visibility": "workspace",
        "template": {
          "url": "/services/blobs/download/5630d1cf14841250525226a6/template.json",
          "upload_date": "2015-10-28 13:46:55.186875",
          "length": 104,
          "content_type": "text/x-shellscript"
        },
        "members": [
    
        ],
        "owner": "operations",
        "organization": "elasticbox",
        "schema": "http://elasticbox.net/schemas/boxes/cloudformation",
        "type": "CloudFormation Service",
        "id": "91645eed-173f-4aac-a713-69c6be7582fe",
        "name": "CF WordPress 2"
      },
      "created": "2015-10-28 13:47:15.567441",
      "uri": "/services/instances/i-ywf1hu",
      "state": "done",
      "boxes": [
        {
          "updated": "2015-10-28 13:46:55.247211",
          "automatic_updates": "off",
          "requirements": [
    
          ],
          "description": "CF test",
          "created": "2015-10-27 12:11:24.734064",
          "deleted": null,
          "variables": [
            {
              "required": false,
              "type": "Binding",
              "name": "Binding",
              "value": "5030fc49-773a-42fa-b569-c551e4f90d77",
              "visibility": "private"
            }
          ],
          "visibility": "workspace",
          "template": {
            "url": "/services/blobs/download/5630d61d14841250525226aa/simple_template.json",
            "upload_date": "2015-10-28 13:46:55.186875",
            "length": 104,
            "content_type": "text/x-shellscript"
          },
          "members": [
    
          ],
          "owner": "operations",
          "organization": "elasticbox",
          "schema": "http://elasticbox.net/schemas/boxes/cloudformation",
          "type": "CloudFormation Service",
          "id": "91645eed-173f-4aac-a713-69c6be7582fe",
          "name": "CF WordPress 2"
        }
      ],
      "schema": "http://elasticbox.net/schemas/instance",
      "members": [
    
      ],
      "owner": "operations",
      "variables": [
    
      ],
      "operation": {
        "event": "deploy",
        "workspace": "operations",
        "created": "2015-10-28 13:47:15.746398"
      },
      "id": "i-ywf1hu",
      "icon": null
    }
    

    Réponse

    {
      "box": "91645eed-173f-4aac-a713-69c6be7582fe",
      "bindings": [
    
      ],
      "updated": "2015-10-28 14:44:49.999798",
      "automatic_updates": "off",
      "name": "CF WordPress 2",
      "service": {
        "type": "CloudFormation Service",
        "id": "eb-5cn45",
        "machines": [
    
        ]
      },
      "tags": [
    
      ],
      "deleted": null,
      "policy_box": {
        "profile": {
          "location": "ap-northeast-1",
          "schema": "http://elasticbox.net/schemas/aws/cloudformation/profile"
        },
        "updated": "2015-10-28 13:46:55.247211",
        "automatic_updates": "off",
        "requirements": [
    
        ],
        "description": "CF test",
        "created": "2015-10-27 12:11:24.734064",
        "deleted": null,
        "variables": [
          {
            "required": false,
            "type": "Binding",
            "name": "Binding",
            "value": "5030fc49-773a-42fa-b569-c551e4f90d77",
            "visibility": "private"
          }
        ],
        "provider_id": "7e841966-1dec-4460-a981-1db4e1eec10c",
        "visibility": "workspace",
        "template": {
          "url": "/services/blobs/download/5630d1cf14841250525226a6/template.json",
          "upload_date": "2015-10-28 13:46:55.186875",
          "length": 104,
          "content_type": "text/x-shellscript"
        },
        "members": [
    
        ],
        "owner": "operations",
        "organization": "elasticbox",
        "schema": "http://elasticbox.net/schemas/boxes/cloudformation",
        "type": "CloudFormation Service",
        "id": "91645eed-173f-4aac-a713-69c6be7582fe",
        "name": "CF WordPress 2"
      },
      "created": "2015-10-28 13:47:15.567441",
      "uri": "/services/instances/i-ywf1hu",
      "state": "done",
      "boxes": [
        {
          "updated": "2015-10-28 13:46:55.247211",
          "automatic_updates": "off",
          "description": "CF test",
          "deleted": null,
          "variables": [
            {
              "required": false,
              "type": "Binding",
              "name": "Binding",
              "value": "5030fc49-773a-42fa-b569-c551e4f90d77",
              "visibility": "private"
            }
          ],
          "visibility": "workspace",
          "members": [
    
          ],
          "owner": "operations",
          "id": "91645eed-173f-4aac-a713-69c6be7582fe",
          "requirements": [
    
          ],
          "name": "CF WordPress 2",
          "created": "2015-10-27 12:11:24.734064",
          "template": {
            "url": "/services/blobs/download/5630d61d14841250525226aa/simple_template.json",
            "upload_date": "2015-10-28 13:46:55.186875",
            "length": 104,
            "content_type": "text/x-shellscript"
          },
          "organization": "elasticbox",
          "type": "CloudFormation Service",
          "schema": "http://elasticbox.net/schemas/boxes/cloudformation"
        }
      ],
      "schema": "http://elasticbox.net/schemas/instance",
      "members": [
    
      ],
      "owner": "operations",
      "variables": [
    
      ],
      "operation": {
        "event": "deploy",
        "workspace": "operations",
        "created": "2015-10-28 13:47:15.746398"
      },
      "id": "i-ywf1hu",
      "icon": null
    }
    

    3. PUT http://cam.ctl.io/services/instances/{instance_id}/reconfigure

    Reconfigures the stack based on the changes.

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
       "id":"i-ywf1hu",
       "method":"reconfigure"
    }
    

    Réponse

    Aucun.

    Contacting Cloud Application Manager Support

    We’re sorry you’re having an issue in Cloud Application Manager. Please review the troubleshooting tips, or contact Cloud Application Manager support with details and screenshots where possible.

    For issues related to API calls, send the request body along with details related to the issue.

    In the case of a box error, share the box in the workspace that your organization and Cloud Application Manager can access and attach the logs.

    • Linux: SSH and locate the log at /var/log/elasticbox/elasticbox-agent.log
    • Windows: RDP into the instance to locate the log at ProgramDataElasticBoxLogselasticbox-agent.log

    Instances API

    Manage and perform actions on instances.

    Create or List Instances

    Ressource Description
    GET /services/instances Gets the list of instances.
    POST /services/instances Creates a new instance, imports an unregistered instance or instances based on schema.

    Perform Instance Operations

    Ressource Description
    GET /services/instances/{instance_id} Fetches an existing instance.
    PUT /services/instances/{instance_id} Updates an existing instance.
    DELETE /services/instances/{instance_id} Terminates, force-terminates, or deletes an existing instance.
    GET /services/instances/{instance_id}/service Gets the instance service.
    GET /services/instances/{instance_id}/activity Gets all activity logs from the executed operations of an instance.
    GET /services/instances/{instance_id}/machine_logs Gets the logs of all machines of a deployed instance.
    GET /services/instances/{instance_id}/binding_instances Gets the binding of a instance.
    GET /services/instances/{instance_id}/operations Gets all operations of an instance.
    PUT /services/instances/{instance_id}/deploy Re-deploy an existing instance.
    PUT /services/instances/{instance_id}/poweron Power-on an existing instance.
    PUT /services/instances/{instance_id}/shutdown Shutdown an existing instance.
    PUT /services/instances/{instance_id}/reinstall Re-install an existing instance.
    PUT /services/instances/{instance_id}/reconfigure Re-configure an existing instance.
    PUT /services/instances/{instance_id}/import Retry to import an unregistered instance.
    PUT /services/instances/{instance_id}/cancel_import Cancel a failed import of an unregistered instance.

    GET /services/instances

    Gets instances that are accessible in the personal workspace of the authenticated user.

    Normal Response Codes

    • 200

    Error Response Codes

    • Bad Request (400)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Type Description
    created chaîne Creation date.
    updated chaîne Date of the last update.
    members array List of members whom you shared the instance.
    owner chaîne Instance owner.
    operation chaîne Last operation, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure , terminate and terminate_service
    nom chaîne Instance name.
    service objet Instance service.
    service.type chaîne Required. Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service.
    service.id chaîne Service unique identifier.
    service.machines array List of service machines
    machine objet Machine contained in the service machines list.
    machine.state chaîne Machine state, there are three possible states: processing , done and unavailable.
    machine.name chaîne Machine name.
    machine.workflow array List of workflow actions, where each workflow action object contains three parameters: box, event, and script.
    workflow.box chaîne Workflow action box.
    workflow.event chaîne Workflow action event.
    workflow.script chaîne Workflow action script uri.
    tags array Instance tags.
    boxes array List of boxes where each box object contains a service parameter. The service parameter can have one of these values: Linux Compute, Windows Compute and CloudFormation Service.
    uri chaîne Instance uri.
    state chaîne Instance state, there are three possible states: processing , done and unavailable
    bindings array List of instance bindings.
    binding objet Binding contained in the bindings list, each binding object contains the parameters: instance and name.
    id array Instance unique identifier
    icon chaîne Instance icon uri.
    schema chaîne Instance schema uri.
    [{
       "box": "691df09c-7588-4310-9e9a-a7993f3670b0",
       "updated": "2015-10-27 16:17:42.237233",
       "automatic_updates": "off",
       "name": "TestVSphere",
       "service": {
           "type": "Linux Compute",
           "id": "eb-ay43t",
           "machines": [
               {
                   "state": "done",
                   "name": "eb-ay43t-1",
                   "workflow": []
               }
           ]
       },
       "tags": [],
       "policy_box": {
           "profile": {
               "resource_pool": "pullrequest",
               "datacenter": "ElasticBox - Development",
               "network": "Cluster Network",
               "disks": [
                   {
                       "datastore": "Development Storage",
                       "name": "Hard disk 1",
                       "template": true,
                       "size": 97
                   }
               ],
               "customization_spec": "None",
               "network_mor": "network-15",
               "instances": 1,
               "template": "debian-7-8-x86-64",
               "datastore": "Development Storage",
               "flavor": "Tiny",
               "schema": "http://elasticbox.net/schemas/vsphere/compute/profile"
           },
           "provider_id": "cac26e4c-16f8-46ad-83ae-52a2b1ba4fca",
           "automatic_updates": "off",
           "name": "TestVSphere",
           "created": "2015-10-09 08:25:02.378295",
           "deleted": null,
           "variables": [],
           "updated": "2015-10-09 08:25:02.378295",
           "lifespan": {
               "operation": "none"
           },
           "visibility": "workspace",
           "members": [],
           "organization": "elasticbox",
           "owner": "operations",
           "claims": [
               "linux"
           ],
           "id": "691df09c-7588-4310-9e9a-a7993f3670b0",
           "schema": "http://elasticbox.net/schemas/boxes/policy"
       },
       "created": "2015-10-09 08:25:36.025086",
       "uri": "/services/instances/i-6bdwwm",
       "id": "i-6bdwwm",
       "state": "done",
       "boxes": [
           {
               "profile": {
                   "resource_pool": "pullrequest",
                   "datacenter": "ElasticBox - Development",
                   "network": "Cluster Network",
                   "disks": [
                       {
                           "datastore": "Development Storage",
                           "name": "Hard disk 1",
                           "template": true,
                           "size": 97
                       }
                   ],
                   "customization_spec": "None",
                   "network_mor": "network-15",
                   "instances": 1,
                   "template": "debian-7-8-x86-64",
                   "datastore": "Development Storage",
                   "flavor": "Tiny",
                   "schema": "http://elasticbox.net/schemas/vsphere/compute/profile"
               },
               "provider_id": "cac26e4c-16f8-46ad-83ae-52a2b1ba4fca",
               "automatic_updates": "off",
               "name": "TestVSphere",
               "created": "2015-10-09 08:25:02.378295",
               "deleted": null,
               "variables": [],
               "updated": "2015-10-09 08:25:02.378295",
               "lifespan": {
                   "operation": "none"
               },
               "visibility": "workspace",
               "members": [],
               "organization": "elasticbox",
               "owner": "operations",
               "claims": [
                   "linux"
               ],
               "id": "691df09c-7588-4310-9e9a-a7993f3670b0",
               "schema": "http://elasticbox.net/schemas/boxes/policy"
           }
       ],
       "members": [],
       "owner": "operations",
       "icon": null,
       "operation": {
           "event": "terminate_service",
           "workspace": "operations",
           "created": "2015-10-27 16:17:36.268988"
       },
       "variables": [],
       "schema": "http://elasticbox.net/schemas/instance"
    },
    {
       "box": "15b5bc28-5ac5-4897-bd72-d4f2101da47a",
       "updated": "2015-10-09 10:00:07.434386",
       "automatic_updates": "off",
       "name": "Test2",
       "service": {
           "type": "Linux Compute",
           "id": "eb-l8gqr",
           "machines": []
       },
       "tags": [],
       "policy_box": {
           "profile": {
               "resource_pool": "pullrequest",
               "datacenter": "ElasticBox - Development",
               "network": "Cluster Network",
               "disks": [],
               "customization_spec": "None",
               "compute_resource": null,
               "instances": 1,
               "network_mor": "network-15",
               "template": "ebx-no-disks",
               "folder": "Templates",
               "flavor": "Tiny",
               "datastore": "Development Storage",
               "schema": "http://elasticbox.net/schemas/vsphere/compute/profile"
           },
           "provider_id": "cac26e4c-16f8-46ad-83ae-52a2b1ba4fca",
           "automatic_updates": "off",
           "name": "Test2",
           "created": "2015-10-09 08:30:52.736712",
           "deleted": null,
           "variables": [],
           "updated": "2015-10-09 08:31:10.338900",
           "lifespan": {
               "operation": "none"
           },
           "visibility": "workspace",
           "members": [],
           "claims": [
               "linux"
           ],
           "owner": "operations",
           "organization": "elasticbox",
           "id": "15b5bc28-5ac5-4897-bd72-d4f2101da47a",
           "schema": "http://elasticbox.net/schemas/boxes/policy"
       },
       "created": "2015-10-09 08:31:16.536012",
       "uri": "/services/instances/i-jt8p5d",
       "id": "i-jt8p5d",
       "state": "done",
       "boxes": [
           {
               "profile": {
                   "resource_pool": "pullrequest",
                   "datacenter": "ElasticBox - Development",
                   "network": "Cluster Network",
                   "disks": [],
                   "customization_spec": "None",
                   "compute_resource": null,
                   "instances": 1,
                   "network_mor": "network-15",
                   "template": "ebx-no-disks",
                   "folder": "Templates",
                   "flavor": "Tiny",
                   "datastore": "Development Storage",
                   "schema": "http://elasticbox.net/schemas/vsphere/compute/profile"
               },
               "provider_id": "cac26e4c-16f8-46ad-83ae-52a2b1ba4fca",
               "automatic_updates": "off",
               "name": "Test2",
               "created": "2015-10-09 08:30:52.736712",
               "deleted": null,
               "variables": [],
               "updated": "2015-10-09 08:31:10.338900",
               "lifespan": {
                   "operation": "none"
               },
               "visibility": "workspace",
               "members": [],
               "claims": [
                   "linux"
               ],
               "owner": "operations",
               "organization": "elasticbox",
               "id": "15b5bc28-5ac5-4897-bd72-d4f2101da47a",
               "schema": "http://elasticbox.net/schemas/boxes/policy"
           }
       ],
       "members": [],
       "owner": "operations",
       "icon": null,
       "operation": {
           "event": "terminate_service",
           "workspace": "operations",
           "created": "2015-10-09 09:59:37.618930"
       },
       "variables": [],
       "schema": "http://elasticbox.net/schemas/instance"
    }]
    

    POST /services/instances

    Creates a new instance and gets the created instance.

    Normal Response Codes

    • 202

    Error Response Codes

    • Invalid Data (400)

    Request Parameters

    Parameter Type Description
    schema chaîne Required. Instance schema URI.
    owner chaîne ID of the workspace where the instance is posted.
    box Objet Box object with its id and a list of overridden variable objects at deployment time
    policy_box Objet Box object with its id and a list of overridden variable objects at deployment time
    automatic_updates chaîne One of the: major, minor, patch, off. Default off.
    lease array Schedules an instance with two parameters:
  • expire. Specifies in UTC format YYYY-MM-DD HH:MM:SS.SSSSSS, the time and date for stopping an instance. It's required only when an instance is set to terminate or shut down.
  • operation. Specifies an instance to stop with shutdown or terminate. When not scheduled, the instance is set to alwayson.
  • nom chaîne Instance name.
    instance_tags array List of tags defined at deployment time.
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body: notice that the request schedules the instance to shut down in five hours.
    {
       "schema": "http://elasticbox.net/schemas/deploy-instance-request",
       "owner": "operations",
       "name": "ScriptBoxSample",
       "box": {
           "id": "7a99f75c-30e6-4986-9059-f6889d1ff5f9",
           "variables": [{
               "name": "variable_name",
               "type": "Text",
               "value": "overridden variable value at deployment time",
               "required": true,
               "visibility": "public"
           }]
       },
       "instance_tags": [
    
       ],
       "automatic_updates": "off",
       "policy_box": {
           "id": "e57466ee-7094-4bd4-9121-a6df4395d493",
           "variables": [
    
           ]
        },
       "lease": {
           "expire": "2014-11-17 23:00:00.000000",
           "operation": "shutdown"
       }
    }
    

    POST /services/instances

    Register an unregistered instance: notice that it's the same endpoint to create a new instance.

    Normal Response Codes

    • 202

    Error Response Codes

    • Invalid Data (400)

    Request Parameters

    Parameter Type Description
    schema chaîne Required. Register Instance Request schema URI.
    owner chaîne ID of the workspace where the instance is imported.
    nom chaîne Instance name to register.
    description chaîne Instance description to register.
    unregistered_id chaîne Instance unique identifier
    linux_username chaîne Linux user to install agent
    private_key chaîne Linux key to install agent
    windows_username chaîne Windows username to install agent
    windows_password chaîne Windows password to install agent
    instance_tags array List of tags defined at deployment time.
    automatic_updates chaîne One of the: major, minor, patch, off. Default off.
    lease array Schedules an instance with two parameters:
  • expire. Specifies in UTC format YYYY-MM-DD HH:MM:SS.SSSSSS, the time and date for stopping an instance. It's required only when an instance is set to terminate or shut down.
  • operation. Specifies an instance to stop with shutdown or terminate. When not scheduled, the instance is set to alwayson.
  • Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    {
       "schema": "http://elasticbox.net/schemas/register-instance-request",
       "owner": "operations",
       "name": "LDAP Box",
       "unregistered_id": "7a99f95c-30e6-4986-9059-f6999d1jhgf9",
       "description": "Ldap server registered",
       "linux_username": "root",
       "private_key": "-----BEGIN RSA PRIVATE KEY-----
    ..................................................
    -----END RSA PRIVATE KEY-----",
       "instance_tags": [],
       "automatic_updates": "off",
       "lease": {
           "expire": "2017-11-11 23:00:00.000000",
           "operation": "shutdown"
       }
    }
    

    For use bulk import, the request must have bulk import request schema, and a list of
    unregistered instances:

    Body:
    {
      "schema": "http://elasticbox.net/schemas/bulk-import-request",
      "owner": "operations",
      "unregistered_instances": [
        {
          "schema": "http://elasticbox.net/schemas/register-instance-request",
          "name": "msql-a",
          "unregistered_id": "5eed8408-3ece-45d9-8e78-3f3472bea165",
          "instance_tags": [
            "zoneA"
          ]
        },
        {
          "schema": "http://elasticbox.net/schemas/register-instance-request",
          "name": "msql-b",
          "unregistered_id": "6b9b9ecc-f22d-4101-991c-c55f8de80439",
          "instance_tags": [
            "zoneB"
          ]
        }
      ],
      "instance_tags": [
        "registered"
      ]
    }
    

    Response Parameters

    Parameter Type Description
    lease array If scheduled, this object displays these parameters for the instance:
  • released. Is a true or false boolean value. False means that the operation scheduled on the instance is not executed yet.
  • expire. Specifies in UTC format YYYY-MM-DD HH:MM:SS.SSSSSS, the time and date for stopping an instance. It applies only when an instance is set to terminate or shut down.
  • operation. Specifies the stop operation scheduled as either shutdown or terminate. When not scheduled, the instance is set to alwayson.
  • bindings array List of instance bindings.
    binding objet Binding contained in the bindings list, each binding object contains the parameters: instance and name.
    updated chaîne Date of the last update.
    nom chaîne Instance name.
    service Objet Instance service.
    service.type chaîne Required. Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service.
    service.id chaîne Service type.
    service.machines array List of service machines.
    machine objet Machine contained in the service machines list.
    machine.state chaîne Machine state, there are three possible states: processing , done and unavailable.
    machine.name chaîne Machine name.
    machine.workflow array List of workflow actions, where each workflow action object contains three parameters: box, event, and script.
    workflow.box chaîne Workflow action box.
    workflow.event chaîne Workflow action event.
    workflow.script chaîne Workflow action script uri.
    tags array Instance tags.
    variables array List of instance variables, each variable object contains the parameters: type , name and value.
    created chaîne Creation date.
    boxes array List of boxes
    box.visibility chaîne Indicates at what level the box is visible. By default, boxes are visible to the workspace they're created in. Can have one of these values:
  • public: Visible to Cloud Application Manager users across all organizations.
  • organization: Visible to all users in the organization where the box was created.
  • workspace: By default, the box is visible only to members of the workspace where it was created.
  • box.organization chaîne Organization to which the box belongs.
    box.updated chaîne Date of the last update.
    box.description chaîne Box description.
    box.service chaîne Required. Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service.
    box.tags array Box tags.
    box.variables array List of box variables, each variable object contains the parameters: type , name and value.
    box.created chaîne Creation date.
    box.uri chaîne Box uri.
    box.id array Box unique identifier.
    box.schema chaîne Box schema uri.
    box.members array List of Box members.
    box.owner chaîne Box owner.
    box.bindings array List of Box bindings.
    box.binding objet Binding contained in the bindings list, each binding have a box and a name.
    box.icon chaîne Box icon uri.
    box.events array List of Box events, there may be nine event lists: configure, dispose, install, post_configure, post_dispose, post_install, post_start, post_stop, start, and stop.
    box.event objet Event contained in one of the event lists, each event object contains the parameters: url , upload_date , length and destination_path.
    box.name chaîne Box name.
    uri chaîne instance uri.
    state chaîne Instance state, there are three possible states: processing , done and unavailable
    members array Instance members.
    owner chaîne Instance owner.
    operation chaîne Last operation, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure , terminate and terminate_service
    icon chaîne Instance icon uri.
    id array Instance unique identifier.
    schema chaîne Instance schema uri.
    policy_box objet specific deployment policy for a provider
    policy_box.provider_id chaîne provider id
    policy_box.automatic_updates chaîne One of them: mayor, minor, patch, off
    policy_box.name chaîne Policy box name
    policy_box.variables array List of deployment box policy variables
    policy_box.claims array List of deployment box policy claims
    policy_box.id chaîne Deployment box policy id
    policy_box.schema chaîne Deployment box policy schema
    policy_box.members array List of members sharing the deployment policy box
    policy_box.owner chaîne Deployment box policy owner
    policy_box.readme objet Readme file for the Deployment policy box
    Response:
    {
     "box": "7a99f75c-30e6-4986-9059-f6889d1ff5f9",
     "policy_box": {
       "profile": {
         "image": "test",
         "instances": 1,
         "keypair": "test_keypair",
         "location": "Simulated Location",
         "flavor": "test.micro",
         "schema": "http://elasticbox.net/schemas/test/compute/profile"
       },
       "provider_id": "0476718d-2b00-45ce-8a1c-30b10a16cfc7",
       "automatic_updates": "off",
       "name": "Linux Compute",
       "created": "2015-10-21 08:35:50.165822",
       "deleted": null,
       "variables": [
         {
           "automatic_updates": "off",
           "name": "policy_box_variable",
           "required": false,
           "visibility": "public",
           "value": "381d0fd8-b59e-4be6-afc7-3ee1a0a2db1c",
           "type": "Box"
         }
       ],
       "updated": "2015-10-29 12:05:39.065397",
       "visibility": "workspace",
       "owner": "operations",
       "members": [
    
       ],
       "claims": [
         "linux"
       ],
       "readme": {
         "url": "#application-lifecycle-management-resources/default-box-overview",
         "upload_date": "2015-10-21 08:35:50.164926",
         "length": 1302,
         "content_type": "text/x-markdown"
       },
       "organization": "elasticbox",
       "id": "e57466ee-7094-4bd4-9121-a6df4395d493",
       "schema": "http://elasticbox.net/schemas/boxes/policy"
     },
     "updated": "2015-10-29 12:26:20.377029",
     "automatic_updates": "off",
     "name": "ScriptBoxSample",
     "service": {
       "type": "Linux Compute",
       "id": "eb-bbhzh",
       "machines": [
    
       ]
     },
     "tags": [
    
     ],
     "deleted": null,
     "variables": [
       {
         "required": true,
         "type": "Text",
         "name": "variable_name",
         "value": "variable_value_overridden",
         "visibility": "public"
       }
     ],
     "created": "2015-10-29 12:26:20.377029",
     "state": "processing",
     "uri": "/services/instances/i-3e43qa",
     "boxes": [
       {
         "updated": "2015-10-29 11:55:23.842461",
         "automatic_updates": "off",
         "requirements": [
    
         ],
         "description": "sample box",
         "name": "ScriptBoxSample",
         "created": "2015-10-29 10:52:08.446868",
         "deleted": null,
         "variables": [
           {
             "required": true,
             "type": "Text",
             "name": "variable_name",
             "value": "variable_value",
             "visibility": "public"
           }
         ],
         "visibility": "workspace",
         "id": "7a99f75c-30e6-4986-9059-f6889d1ff5f9",
         "members": [
    
         ],
         "owner": "operations",
         "organization": "elasticbox",
         "events": {
           "configure": {
             "url": "/services/blobs/download/5631fa7614841250525226cc/configure",
             "length": 5,
             "destination_path": "scripts",
             "content_type": "text/x-shellscript"
           },
           "install": {
             "url": "/services/blobs/download/5631fa6614841250525226ca/install",
             "length": 5,
             "destination_path": "scripts",
             "content_type": "text/x-shellscript"
           }
         },
         "schema": "http://elasticbox.net/schemas/boxes/script"
       }
     ],
     "members": [
    
     ],
     "bindings": [
    
     ],
     "owner": "operations",
     "operation": {
       "event": "deploy",
       "workspace": "operations",
       "created": "2015-10-29 12:26:20.375582"
     },
     "schema": "http://elasticbox.net/schemas/instance",
     "id": "i-3e43qa",
     "icon": null
    }
    

    GET /services/instances/{instance_id}

    Fetches an existing instance given its ID.

    Normal Response Codes

    • 200

    Error Response Codes

    • Invalid Data (400)
    • Forbidden (403)
    • Not Found (404)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Type Description
    bindings array List of instance bindings.
    binding objet Binding contained in the bindings list, each binding object contains the parameters: instance and name.
    updated chaîne Date of the last update.
    nom chaîne Instance name.
    service objet Instance service.
    service.type chaîne Required. Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service.
    service.id chaîne Service type.
    service.machines array List of service machines
    machine objet Machine contained in the service machines list.
    machine.state chaîne Machine state, there are three possible states: processing , done and unavailable.
    machine.name chaîne Machine name.
    machine.workflow array List of workflow actions, where each workflow action object contains three parameters: box, event, and script.
    workflow.box chaîne Workflow action box.
    workflow.event chaîne Workflow action event.
    workflow.script chaîne Workflow action script uri.
    tags array Instance tags.
    variables array List of instance variables, each variable object contains the parameters: type , name and value.
    created chaîne Creation date.
    boxes array List of boxes
    box.visibility chaîne Indicates at what level the box is visible. By default, boxes are visible to the workspace they're created in. Can have one of these values:
  • public: Visible to Cloud Application Manager users across all organizations.
  • organization: Visible to all users in the organization where the box was created.
  • workspace: By default, the box is visible only to members of the workspace where it was created.
  • box.organization chaîne Organization to which the box belongs.
    box.updated chaîne Date of the last update.
    box.description chaîne Box description.
    box.service chaîne Required. Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service.
    box.tags array Box tags.
    box.variables array List of box variables, each variable object contains the parameters: type , name and value.
    box.created chaîne Creation date.
    box.uri chaîne Box uri.
    box.id array Box unique identifier.
    box.schema chaîne Box schema uri.
    box.members array List of Box members.
    box.owner chaîne Box owner.
    box.bindings array List of Box bindings.
    box.binding objet Binding contained in the bindings list, each binding have a box and a name.
    box.icon chaîne Box icon uri.
    box.events array List of Box events, there may be nine event lists: configure, dispose, install, post_configure, post_dispose, post_install, post_start, post_stop, start, and stop.
    box.event objet Event contained in one of the event lists, each event object contains the parameters: url , upload_date , length and destination_path.
    box.name chaîne Box name.
    policy_box objet specific deployment policy for a provider
    policy_box.provider_id chaîne provider id
    policy_box.automatic_updates chaîne One of them: mayor, minor, patch, off
    policy_box.name chaîne Policy box name
    policy_box.variables array List of deployment box policy variables
    policy_box.claims array List of deployment box policy claims
    policy_box.id chaîne Deployment box policy id
    policy_box.schema chaîne Deployment box policy schema
    policy_box.members array List of members sharing the deployment policy box
    policy_box.owner chaîne Deployment box policy owner
    policy_box.readme objet Readme file for the Deployment policy box
    uri chaîne instance uri.
    state chaîne Instance state, there are three possible states: processing , done and unavailable
    members array Instance members.
    owner chaîne Instance owner.
    operation chaîne Last operation, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure , terminate and terminate_service
    icon chaîne Instance icon uri.
    id array Instance unique identifier.
    schema chaîne Instance schema uri.
    {
     "box": "7a99f75c-30e6-4986-9059-f6889d1ff5f9",
     "bindings": [
    
     ],
     "updated": "2015-10-29 12:26:24.446893",
     "automatic_updates": "off",
     "name": "ScriptBoxSample",
     "service": {
       "type": "Linux Compute",
       "id": "eb-bbhzh",
       "machines": [
         {
           "state": "done",
           "name": "eb-bbhzh-1",
           "workflow": [
    
           ]
         }
       ]
     },
     "tags": [
    
     ],
     "deleted": null,
     "policy_box": {
       "profile": {
         "image": "test",
         "instances": 1,
         "keypair": "test_keypair",
         "location": "Simulated Location",
         "flavor": "test.micro",
         "schema": "http://elasticbox.net/schemas/test/compute/profile"
       },
       "provider_id": "0476718d-2b00-45ce-8a1c-30b10a16cfc7",
       "automatic_updates": "off",
       "name": "Linux Compute",
       "created": "2015-10-21 08:35:50.165822",
       "deleted": null,
       "variables": [
         {
           "automatic_updates": "off",
           "name": "policy_box_variable",
           "required": false,
           "visibility": "public",
           "value": "381d0fd8-b59e-4be6-afc7-3ee1a0a2db1c",
           "type": "Box"
         }
       ],
       "updated": "2015-10-29 12:05:39.065397",
       "visibility": "workspace",
       "owner": "operations",
       "members": [
    
       ],
       "claims": [
         "linux"
       ],
       "readme": {
         "url": "#application-lifecycle-management-resources/default-box-overview",
         "upload_date": "2015-10-21 08:35:50.164926",
         "length": 1302,
         "content_type": "text/x-markdown"
       },
       "organization": "elasticbox",
       "id": "e57466ee-7094-4bd4-9121-a6df4395d493",
       "schema": "http://elasticbox.net/schemas/boxes/policy"
     },
     "created": "2015-10-29 12:26:20.377029",
     "uri": "/services/instances/i-3e43qa",
     "state": "done",
     "boxes": [
       {
         "updated": "2015-10-29 11:55:23.842461",
         "automatic_updates": "off",
         "requirements": [
    
         ],
         "description": "sample box",
         "name": "ScriptBoxSample",
         "created": "2015-10-29 10:52:08.446868",
         "deleted": null,
         "variables": [
           {
             "required": true,
             "type": "Text",
             "name": "variable_name",
             "value": "variable_value",
             "visibility": "public"
           }
         ],
         "visibility": "workspace",
         "id": "7a99f75c-30e6-4986-9059-f6889d1ff5f9",
         "members": [
    
         ],
         "owner": "operations",
         "organization": "elasticbox",
         "events": {
           "configure": {
             "url": "/services/blobs/download/5631fa7614841250525226cc/configure",
             "length": 5,
             "destination_path": "scripts",
             "content_type": "text/x-shellscript"
           },
           "install": {
             "url": "/services/blobs/download/5631fa6614841250525226ca/install",
             "length": 5,
             "destination_path": "scripts",
             "content_type": "text/x-shellscript"
           }
         },
         "schema": "http://elasticbox.net/schemas/boxes/script"
       }
     ],
     "schema": "http://elasticbox.net/schemas/instance",
     "members": [
    
     ],
     "owner": "operations",
     "variables": [
       {
         "required": true,
         "type": "Text",
         "name": "variable_name",
         "value": "variable_value_overridden",
         "visibility": "public"
       }
     ],
     "operation": {
       "event": "deploy",
       "workspace": "operations",
       "created": "2015-10-29 12:26:20.504356"
     },
     "id": "i-3e43qa",
     "icon": null
    }
    

    PUT /services/instances/{instance_id}

    Given the instance ID, updates only these fields of an existing instance: boxes, tags, schedule, members, and variables. The request body should contain an instance object.

    Normal Response Codes

    • 200
    • 202

    Error Response Codes

    • Invalid Data (400)
    • Forbidden (403)
    • Not Found (404)

    Request Parameters

    Parameter Type Description
    bindings array List of instance bindings.
    binding objet Binding contained in the bindings list, each binding object contains the parameters: instance and name.
    updated chaîne Date of the last update.
    nom chaîne Instance name.
    service objet Instance service.
    service.type chaîne Required. Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service.
    service.id chaîne Service type.
    service.machines array List of service machines
    machine objet Machine contained in the service machines list.
    machine.state chaîne Machine state, there are three possible states: processing , done and unavailable.
    machine.name chaîne Machine name.
    machine.workflow array List of workflow actions, where each workflow action object contains three parameters: box, event, and script.
    workflow.box chaîne Workflow action box.
    workflow.event chaîne Workflow action event.
    workflow.script chaîne Workflow action script uri.
    tags array Instance tags.
    variables array List of instance variables, each variable object contains the parameters: type , name and value.
    created chaîne Creation date.
    boxes array List of boxes
    box.visibility chaîne Indicates at what level the box is visible. By default, boxes are visible to the workspace they're created in. Can have one of these values:
  • public: Visible to Cloud Application Manager users across all organizations.
  • organization: Visible to all users in the organization where the box was created.
  • workspace: By default, the box is visible only to members of the workspace where it was created.
  • box.organization chaîne Organization to which the box belongs.
    box.updated chaîne Date of the last update.
    box.description chaîne Box description.
    box.service chaîne Required. Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service.
    box.tags array Box tags.
    box.variables array List of box variables, each variable object contains the parameters: type , name and value.
    box.created chaîne Creation date.
    box.uri chaîne Box uri.
    box.id array Box unique identifier.
    box.schema chaîne Box schema uri.
    box.members array List of Box members.
    box.owner chaîne Box owner.
    box.bindings array List of Box bindings.
    box.binding objet Binding contained in the bindings list, each binding have a box and a name.
    box.icon chaîne Box icon uri.
    box.events array List of Box events, there may be nine event lists: configure, dispose, install, post_configure, post_dispose, post_install, post_start, post_stop, start, and stop.
    box.event objet Event contained in one of the event lists, each event object contains the parameters: url , upload_date , length and destination_path.
    box.name chaîne Box name.
    policy_box objet specific deployment policy for a provider
    policy_box.provider_id chaîne provider id
    policy_box.automatic_updates chaîne One of them: mayor, minor, patch, off
    policy_box.name chaîne Policy box name
    policy_box.variables array List of deployment box policy variables
    policy_box.claims array List of deployment box policy claims
    policy_box.id chaîne Deployment box policy id
    policy_box.schema chaîne Deployment box policy schema
    policy_box.members array List of members sharing the deployment policy box
    policy_box.owner chaîne Deployment box policy owner
    policy_box.readme objet Readme file for the Deployment policy box
    uri chaîne instance uri.
    state chaîne Instance state, there are three possible states: processing , done and unavailable
    members array Instance members.
    owner chaîne Instance owner.
    operation chaîne Last operation, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure , terminate and terminate_service
    icon chaîne Instance icon uri.
    id array Instance unique identifier.
    schema chaîne Instance schema uri.
    lease array Schedules an instance with two parameters:
  • expire. Specifies in UTC format YYYY-MM-DD HH:MM:SS.SSSSSS, the time and date for stopping an instance. It's required only when an instance is set to terminate or shut down.
  • operation. Specifies an instance to stop with shutdown or terminate. When not scheduled, the instance is set to alwayson.
  • Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    In this sample request, the instance is tagged and scheduled to terminate at a given UTC time.
    
    
    {
       "box": "7a99f75c-30e6-4986-9059-f6889d1ff5f9",
       "bindings": [
    
       ],
       "updated": "2015-10-29 12:26:24.446893",
       "automatic_updates": "off",
       "name": "ScriptBoxSample",
       "service": {
       "type": "Linux Compute",
       "id": "eb-bbhzh",
       "machines": [
         {
           "state": "done",
           "name": "eb-bbhzh-1",
           "workflow": [
    
           ]
         }
       ]
       },
       "tags": [
    
       ],
       "deleted": null,
       "policy_box": {
           "profile": {
             "image": "test",
             "instances": 1,
             "keypair": "test_keypair",
             "location": "Simulated Location",
             "flavor": "test.micro",
             "schema": "http://elasticbox.net/schemas/test/compute/profile"
           },
           "provider_id": "0476718d-2b00-45ce-8a1c-30b10a16cfc7",
           "automatic_updates": "off",
           "name": Linux Compute",
           "created": "2015-10-21 08:35:50.165822",
           "deleted": null,
           "variables": [
             {
               "automatic_updates": "off",
               "name": "policy_box_variable",
               "required": false,
               "visibility": "public",
               "value": "381d0fd8-b59e-4be6-afc7-3ee1a0a2db1c",
               "type": "Box"
             }
           ],
           "updated": "2015-10-29 12:05:39.065397",
           "visibility": "workspace",
           "owner": "operations",
           "members": [
    
           ],
           "claims": [
             "linux"
           ],
           "readme": {
             "url": "#application-lifecycle-management-resources/default-box-overview",
             "upload_date": "2015-10-21 08:35:50.164926",
             "length": 1302,
             "content_type": "text/x-markdown"
           },
           "organization": "elasticbox",
           "id": "e57466ee-7094-4bd4-9121-a6df4395d493",
           "schema": "http://elasticbox.net/schemas/boxes/policy"
       },
       "created": "2015-10-29 12:26:20.377029",
       "uri": "/services/instances/i-3e43qa",
       "state": "done",
       "boxes": [
           {
           "updated": "2015-10-29 11:55:23.842461",
           "automatic_updates": "off",
           "requirements": [
    
           ],
           "description": "sample box",
           "name": "ScriptBoxSample",
           "created": "2015-10-29 10:52:08.446868",
           "deleted": null,
           "variables": [
           {
             "required": true,
             "type": "Text",
             "name": "variable_name",
             "value": "variable_value",
             "visibility": "public"
           }
           ],
           "visibility": "workspace",
           "id": "7a99f75c-30e6-4986-9059-f6889d1ff5f9",
           "members": [
    
           ],
           "owner": "operations",
           "organization": "elasticbox",
           "events": {
               "configure": {
                 "url": "/services/blobs/download/5631fa7614841250525226cc/configure",
                 "length": 5,
                 "destination_path": "scripts",
                 "content_type": "text/x-shellscript"
               },
               "install": {
                 "url": "/services/blobs/download/5631fa6614841250525226ca/install",
                 "length": 5,
                 "destination_path": "scripts",
                 "content_type": "text/x-shellscript"
               }
           },
           "schema": "http://elasticbox.net/schemas/boxes/script"
           }
       ],
       "schema": "http://elasticbox.net/schemas/instance",
       "members": [
    
       ],
       "owner": "operations",
       "variables": [
           {
             "required": true,
             "type": "Text",
             "name": "variable_name",
             "value": "variable_value_overridden",
             "visibility": "public"
           }
       ],
       "operation": {
           "event": "deploy",
           "workspace": "operations",
           "created": "2015-10-29 12:26:20.504356"
       },
       "id": "i-3e43qa",
       "icon": null,
       "lease": {
           "expire": "2015-10-29 19:00:00.000000",
           "operation": "terminate"
       }
    }
    

    Response Parameters

    Parameter Type Description
    bindings array List of instance bindings.
    binding objet Binding contained in the bindings list, each binding object contains the parameters: instance and name.
    updated chaîne Date of the last update.
    nom chaîne Instance name.
    service Objet Instance service.
    service.type chaîne Required. Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service.
    service.id chaîne Service type.
    service.machines array List of service machines.
    machine objet Machine contained in the service machines list.
    machine.state chaîne Machine state, there are three possible states: processing , done and unavailable.
    machine.name chaîne Machine name.
    machine.workflow array List of workflow actions, where each workflow action object contains three parameters: box, event, and script.
    workflow.box chaîne Workflow action box.
    workflow.event chaîne Workflow action event.
    workflow.script chaîne Workflow action script uri.
    tags array Instance tags.
    variables array List of instance variables, each variable object contains the parameters: type , name and value.
    created chaîne Creation date.
    boxes array List of boxes
    box.visibility chaîne Indicates at what level the box is visible. By default, boxes are visible to the workspace they're created in. Can have one of these values:
  • public: Visible to Cloud Application Manager users across all organizations.
  • organization: Visible to all users in the organization where the box was created.
  • workspace: By default, the box is visible only to members of the workspace where it was created.
  • box.organization chaîne Organization to which the box belongs.
    box.updated chaîne Date of the last update.
    box.description chaîne Box description.
    box.service chaîne Required. Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service.
    box.tags array Box tags.
    box.variables array List of box variables, each variable object contains the parameters: type , name and value.
    box.created chaîne Creation date.
    box.uri chaîne Box uri.
    box.id array Box unique identifier.
    box.schema chaîne Box schema uri.
    box.members array List of Box members.
    box.owner chaîne Box owner.
    box.bindings array List of Box bindings.
    box.binding objet Binding contained in the bindings list, each binding have a box and a name.
    box.icon chaîne Box icon uri.
    box.events array List of Box events, there may be nine event lists: configure, dispose, install, post_configure, post_dispose, post_install, post_start, post_stop, start, and stop.
    box.event objet Event contained in one of the event lists, each event object contains the parameters: url , upload_date , length and destination_path.
    box.name chaîne Box name.
    policy_box objet specific deployment policy for a provider
    policy_box.provider_id chaîne provider id
    policy_box.automatic_updates chaîne One of them: mayor, minor, patch, off
    policy_box.name chaîne Policy box name
    policy_box.variables array List of deployment box policy variables
    policy_box.claims array List of deployment box policy claims
    policy_box.id chaîne Deployment box policy id
    policy_box.schema chaîne Deployment box policy schema
    policy_box.members array List of members sharing the deployment policy box
    policy_box.owner chaîne Deployment box policy owner
    policy_box.readme objet Readme file for the Deployment policy box
    uri chaîne instance uri.
    state chaîne Instance state, there are three possible states: processing , done and unavailable
    members array Instance members.
    owner chaîne Instance owner.
    operation chaîne Last operation, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure , terminate and terminate_service
    icon chaîne Instance icon uri.
    id array Instance unique identifier.
    schema chaîne Instance schema uri.
    lease array Schedules an instance with two parameters:
  • released. Is a true or false boolean value. False means that the operation scheduled on the instance is not executed yet.
  • expire. Specifies in UTC format YYYY-MM-DD HH:MM:SS.SSSSSS, the time and date for stopping an instance. It's required only when an instance is set to terminate or shut down.
  • operation. Specifies an instance to stop with shutdown or terminate. When not scheduled, the instance is set to alwayson.
  • {
       "box": "7a99f75c-30e6-4986-9059-f6889d1ff5f9",
       "bindings": [],
       "updated": "2015-10-29 14:16:48.304153",
       "automatic_updates": "off",
       "name": "ScriptBoxSample",
       "service": {
           "type": "Linux Compute",
           "id": "eb-bbhzh",
           "machines": [
               {
                   "state": "done",
                   "name": "eb-bbhzh-1",
                   "workflow": []
               }
           ]
       },
       "tags": [],
       "deleted": null,
       "policy_box": {
           "profile": {
               "image": "test",
               "instances": 1,
               "keypair": "test_keypair",
               "location": "Simulated Location",
               "flavor": "test.micro",
               "schema": "http://elasticbox.net/schemas/test/compute/profile"
           },
           "provider_id": "0476718d-2b00-45ce-8a1c-30b10a16cfc7",
           "automatic_updates": "off",
           "name": "Deploy Policy - Linux Compute",
           "created": "2015-10-21 08:35:50.165822",
           "deleted": null,
           "variables": [
               {
                   "automatic_updates": "off",
                   "name": "policy_box_variable",
                   "required": false,
                   "visibility": "public",
                   "value": "381d0fd8-b59e-4be6-afc7-3ee1a0a2db1c",
                   "type": "Box"
               }
           ],
           "updated": "2015-10-29 12:05:39.065397",
           "visibility": "workspace",
           "owner": "operations",
           "members": [],
           "claims": [
               "linux"
           ],
           "readme": {
               "url": "#application-lifecycle-management-resources/default-box-overview",
               "upload_date": "2015-10-21 08:35:50.164926",
               "length": 1302,
               "content_type": "text/x-markdown"
           },
           "organization": "elasticbox",
           "id": "e57466ee-7094-4bd4-9121-a6df4395d493",
           "schema": "http://elasticbox.net/schemas/boxes/policy"
       },
       "created": "2015-10-29 12:26:20.377029",
       "uri": "/services/instances/i-3e43qa",
       "state": "done",
       "boxes": [
           {
               "updated": "2015-10-29 11:55:23.842461",
               "automatic_updates": "off",
               "requirements": [],
               "description": "sample box",
               "name": "ScriptBoxSample",
               "created": "2015-10-29 10:52:08.446868",
               "deleted": null,
               "variables": [
                   {
                       "required": true,
                       "type": "Text",
                       "name": "variable_name",
                       "value": "variable_value",
                       "visibility": "public"
                   }
               ],
               "visibility": "workspace",
               "id": "7a99f75c-30e6-4986-9059-f6889d1ff5f9",
               "members": [],
               "owner": "operations",
               "organization": "elasticbox",
               "events": {
                   "configure": {
                       "url": "/services/blobs/download/5631fa7614841250525226cc/configure",
                       "length": 5,
                       "destination_path": "scripts",
                       "content_type": "text/x-shellscript"
                   },
                   "install": {
                       "url": "/services/blobs/download/5631fa6614841250525226ca/install",
                       "length": 5,
                       "destination_path": "scripts",
                       "content_type": "text/x-shellscript"
                   }
               },
               "schema": "http://elasticbox.net/schemas/boxes/script"
           }
       ],
       "schema": "http://elasticbox.net/schemas/instance",
       "members": [],
       "owner": "operations",
       "variables": [
           {
               "required": true,
               "type": "Text",
               "name": "variable_name",
               "value": "variable_value_overridden",
               "visibility": "public"
           }
       ],
       "operation": {
           "event": "deploy",
           "workspace": "operations",
           "created": "2015-10-29 12:26:20.504356"
       },
       "lease": {
           "released": false,
           "operation": "terminate",
           "expire": "2015-10-29 19:00:00.000000"
       },
       "id": "i-3e43qa",
       "icon": null
    }
    

    DELETE /services/instances/{instance_id}

    Terminates, force-terminates, or deletes an existing instance based on its instance ID.

    Normal Response Codes

    • 202

    Error Response Codes

    • Invalid Operation (400)
    • Forbidden (403)
    • Not Found (404)
    • Operation Conflict (409)

    Request Parameters

    Parameter Type Description
    operation chaîne Operation type must be one of the following values: terminate, force_terminate and delete
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    DELETE /services/instances/{instance_id}?operation=force_terminate
    

    GET /services/instances/{instance_id}/service

    Gets the service on the instance given its instance ID.

    Normal Response Codes

    • 200

    Error Response Codes

    • Forbidden (403)
    • Not Found (404)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Type Description
    profile objet Service profile.
    profile.subnet chaîne Profile subnet.
    profile.image chaîne Profile image.
    profile.keypair chaîne Profile keypair.
    profile.location chaîne Profile location.
    profile.security_group chaîne Profile secruty group.
    profile.flavor chaîne Profile flavor.
    profile.autoscalable boolean Profile autoscalable.
    profile.cloud boolean Cloud type.
    profile.schema chaîne Profile schema uri.
    provider_id chaîne Profile provider unique identifier.
    created chaîne Creation date.
    tags array Service tags.
    state chaîne Service state, there are three possible states: processing , done and unavailable
    token chaîne Service token.
    operation chaîne Service last operation, there are seven types of operations: deploy, shutdown, poweron, reinstall, reconfigure, terminate, and terminate_service.
    icon chaîne Service icon url.
    type chaîne Instance type.
    id chaîne Instance unique identifier.
    machines array List of service machines.
    machine.token chaîne Machine token.
    machine.name chaîne Machine name.
    machine.address array The array contains the public and private address.
    machine.agent_version array Machine agent version.
    machine.external_id array Machine external id.
    machine.state chaîne Machine state, there are three possible states: processing , done and unavailable.
    machine.schema array Machine schema uri.
    schema chaîne Service schema uri.
    organization chaîne The name of the organization that owns this service.
    deleted chaîne Deleted.
    {
       "profile": {
           "image": "test",
           "instances": 1,
           "keypair": "test_keypair",
           "location": "Simulated Location",
           "flavor": "test.micro",
           "schema": "http://elasticbox.net/schemas/test/compute/profile"
       },
       "schema": "http://elasticbox.net/schemas/service",
       "provider_id": "0476718d-2b00-45ce-8a1c-30b10a16cfc7",
       "tags": [],
       "deleted": null,
       "variables": [],
       "created": "2015-10-29 12:26:20.384736",
       "state_history": [
           {
               "started": "2015-10-29 12:26:21.719034",
               "state": "up"
           }
       ],
       "updated": "2015-10-29 12:26:21.824949",
       "token": "8f4ca23f-5b01-44b8-810c-21b287e63098",
       "state": "done",
       "organization": "elasticbox",
       "operation": "deploy",
       "type": "Linux Compute",
       "id": "eb-bbhzh",
       "machines": [
           {
               "name": "eb-bbhzh-1",
               "token": "d58634c4-b8f0-4bef-b2f8-a2a83e8397da",
               "state": "done",
               "tmp_folder": "/tmp/eb-bbhzh-1TeAIPz",
               "address": {
                   "public": "127.59.247.222",
                   "private": "127.218.204.194"
               },
               "schema": "http://elasticbox.net/schemas/test/service-machine",
               "external_id": "eb-bbhzh-1TeAIPz",
               "agent_version": "6.2"
           }
       ],
       "icon": "images/platform/linux.png"
    }
    

    GET /services/instances/{instance_id}/activity

    Gets all activity logs from operations run on an instance given its instance ID.

    Normal Response Codes

    • 200

    Error Response Codes

    • Forbidden (403)
    • Not Found (404)

    Request Parameters

    Parameter Type Description
    (Optional) operation chaîne The specific operation id, there are seven types of operations: deploy, shutdown, poweron, reinstall, reconfigure, terminate and terminate_service.
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    GET /services/instances/{instance_id}/activity?operation=deploy
    

    Response Parameters

    Parameter Type Description
    * box chaîne Box name.
    username chaîne User who performed the activity.
    * machine chaîne Machine.
    level chaîne Activity type.
    text chaîne Activity description.
    created chaîne Activity creation date.
    * event chaîne Activity event.
    [
           {
               "text": "Deploying instance.",
               "created": "2015-10-29 12:26:20.510174",
               "level": "start"
           },
           {
               "text": "Creating machine eb-bbhzh-1.",
               "created": "2015-10-29 12:26:20.558906",
               "level": "add"
           },
           {
               "text": "Waiting to install ElasticBox agent in machine eb-bbhzh-1.",
               "created": "2015-10-29 12:26:21.717263",
               "level": "waiting"
           },
           {
               "box": "",
               "created": "2015-10-29 12:26:21.905717",
               "text": "Executing install:ScriptBoxSample in machine eb-bbhzh-1.",
               "level": "install",
               "machine": "eb-bbhzh-1",
               "event": "install"
           },
           {
               "box": "",
               "created": "2015-10-29 12:26:22.262111",
               "text": "Executing configure:ScriptBoxSample in machine eb-bbhzh-1.",
               "level": "configure",
               "machine": "eb-bbhzh-1",
               "event": "configure"
           },
           {
               "text": "Machine eb-bbhzh-1 successfully deployed.",
               "created": "2015-10-29 12:26:24.433644",
               "level": "success"
           },
           {
               "text": "Instance successfully deployed.",
               "created": "2015-10-29 12:26:24.437692",
               "level": "success"
           }
    ]
    

    GET /services/instances/{instance_id}/machine_logs

    Gets the logs of one machine for a deployed instance given its instance ID.

    Normal Response Codes

    • 200

    Error Response Codes

    • Forbidden (403)
    • Not Found (404)

    Request Parameters

    Parameter Type Description
    machine_name chaîne The name of the machine you want to retrieve the log. You can get the name of the machine from the instance document.
    (Optional) box chaîne Box name.
    (Optional) event chaîne Event type, there may be nine event lists: configure, dispose, install, post_dispose, post_stop, pre_configure, pre_install, pre_start, start and stop.
    (Optional) operation chaîne The specific operation id, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure, terminate and terminate_service.
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    GET /services/instances/{instance_id}/machine_logs?machine_name={machine_name}
    

    Réponse

    Executing pre_install-{instance_id} script
    ...
    pre_install-{instance_id} successfully executed.
    Executing install-{instance_id} script
    ...
    install-{instance_id} successfully executed.
    Executing configure-{instance_id} script
    ...
    configure-{instance_id} successfully executed.
    

    GET /services/instances/{instance_id}/binding

    Gets the binding of an instance when you give the instance ID.

    Normal Response Codes

    • 200

    Error Response Codes

    • Forbidden (403)
    • Not Found (404)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Type Description
    updated chaîne Date of the last update.
    operation chaîne Last operation, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure , terminate and terminate_service
    nom chaîne Instance name.
    service Objet Instance service.
    service.type chaîne Required. Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service.
    service.id chaîne Service type.
    service.machines array List of service machines
    machine objet Machine contained in the service machines list.
    machine.state chaîne Machine state, there are three possible states: processing , done and unavailable.
    machine.name chaîne Machine name.
    machine.workflow array List of workflow actions, where each workflow action object contains three parameters: box, event, and script.
    workflow.box chaîne Workflow action box.
    workflow.event chaîne Workflow action event.
    workflow.script chaîne Workflow action script uri.
    tags array Instance tags.
    boxes array List of boxes where each box object contains a service parameter. The service parameter can have one of these values: Linux Compute, Windows Compute and CloudFormation Service.
    uri chaîne Instance uri.
    state chaîne Instance state, there are three possible states: processing , done and unavailable
    bindings array List of instance bindings.
    binding objet Binding contained in the bindings list, each binding object contains the parameters: instance and name.
    id array Instance unique identifier
    icon chaîne Instance icon uri.
    schema chaîne Instance schema uri.
    [
      {
         "box":{
            "version":"1186ce20-96f2-458d-ae62-19496036b275",
            "name":"Wordpress"
         },
         "updated":"2014-03-21 18:20:04.921745",
         "name":"profile",
         "created":"2014-03-21 18:20:04.921745",
         "default_stamp":1395426004.921258,
         "uri":"--profile uri--",
         "instances":[
            {
               "box":{
                  "version":"1186ce20-96f2-458d-ae62-19496036b275",
                  "name":"Wordpress"
               },
               "profile":{
                  "subnet":"us-east-1b",
                  "image":"Linux Compute",
                  "instances":1,
                  "keypair":"None",
                  "location":"us-east-1",
                  "security_group":"Automatic",
                  "flavor":"t1.micro",
                  "autoscalable":false,
                  "cloud":"EC2",
                  "schema":"http://elasticbox.net/schemas/aws/ec2/profile"
               },
               "provider":"Amazon",
               "path":"/",
               "variables":[
                  {
                     "type":"Port",
                     "name":"http",
                     "value":"80"
                  }
               ],
               "bindings":[
    
               ]
            }
         ],
         "members":[
                   "member1","member2"
         ],
         "owner":"workspace1",
         "id":"--profile id--",
         "schema":"http://elasticbox.net/schemas/deployment-profile"
      }
    ]
    

    GET /services/instances/{instance_id}/operations

    Gets all operations run on an instance when you give the instance ID.

    Normal Response Codes

    • 200

    Error Response Codes

    • Forbidden (403)
    • Not Found (404)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    Response Parameters

    Parameter Type Description
    username chaîne User name.
    updated chaîne Date of the last update.
    created chaîne Creation date.
    instance chaîne Instance unique identifier.
    state chaîne Instance state, there are three possible states: processing , done and unavailable
    workspace chaîne Workspace name.
    activities array List of activities.
    activity.username chaîne User who performed the activity.
    activity.text chaîne Activity description.
    activity.level chaîne Activity type.
    activity.created chaîne Activity date.
    operation chaîne Last operation, there are seven types of operations: deploy, shutdown, poweron, reinstall, reconfigure, terminate and terminate_service.
    id chaîne Operation unique identifier.
    deleted chaîne Removal date.
    schema chaîne Operation schema uri.
    [
      {
         "username":"--user--",
         "updated":"2014-03-27 13:37:23.533241",
         "created":"2014-03-27 13:33:49.602291",
         "instance":"i-ndt46z",
         "state":"done",
         "workspace":"--workspace name--",
         "activity":[
            {
               "username":"--user--",
               "text":"Deploying instance.",
               "level":"start",
               "created":"2014-03-27 13:33:49.642654"
            },
            {
               "username":"--user--",
               "text":"Binding linux_compute is up and running.",
               "level":"info",
               "created":"2014-03-27 13:37:22.826035"
            },
         ],
         "operation":"deploy",
         "id":"3265826c-0d00-4619-9e8c-d1dc23d2c81c",
         "schema":"http://elasticbox.net/schemas/instance-operation"
      }
    ]
    

    PUT /services/instances/{instance_id}/deploy

    Re-deploy an existing instance, requires the specified id instance_id.

    Normal Response Codes

    • 202

    Error Response Codes

    • Operation Conflict (409)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    PUT /services/instances/{instance_id}/poweron

    Powers on an existing instance when you give the instance ID.

    Normal Response Codes

    • 202

    Error Response Codes

    • Operation Conflict (409)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    PUT /services/instances/{instance_id}/shutdown

    Shuts down an existing instance when you give the instance ID.

    Normal Response Codes

    • 202

    Error Response Codes

    • Operation Conflict (409)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    PUT /services/instances/{instance_id}/reinstall

    Reinstalls an existing instance when you give its ID.

    Normal Response Codes

    • 202

    Error Response Codes

    • Operation Conflict (409)

    Requête

    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    

    PUT /services/instances/{instance_id}/reconfigure

    Re-configures an existing instance when you give its ID.

    Normal Response Codes

    • 202

    Error Response Codes

    • Operation Conflict (409)

    Request Parameters

    Parameter Type Description
    id chaîne Instance ID.
    method chaîne Operation on the instance.
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
      "id":"i-4g166v",
      "method":"reconfigure"
    }
    

    PUT /services/instances/{instance_id}/import

    Retry to import an unregistered instance. when you give its ID.

    Normal Response Codes

    • 202

    Error Response Codes

    • Forbidden (403)
    • Not Found (404)

    Request Parameters

    Parameter Type Description
    id chaîne Instance ID.
    method chaîne Operation on the instance (import).
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
      "id":"i-eruumb",
      "method":"import"
    }
    

    PUT /services/instances/{instance_id}/cancel_import

    Cancel a failed import of an unregistered instance when you give its ID.

    Normal Response Codes

    • 202

    Error Response Codes

    • Forbidden (403)
    • Not Found (404)

    Request Parameters

    Parameter Type Description
    id chaîne Instance ID.
    method chaîne Operation on the instance (cancel_import).
    Headers:
    
    Content-Type: application/json
    Elasticbox-Token: your_authentication_token
    ElasticBox-Release: 4.0
    
    Body:
    
    {
      "id":"i-eruumb",
      "method":"cancel_import"
    }
    

    Contacting Cloud Application Manager Support

    We’re sorry you’re having an issue in Cloud Application Manager. Please review the troubleshooting tips, or contact Cloud Application Manager support with details and screenshots where possible.

    For issues related to API calls, send the request body along with details related to the issue.

    In the case of a box error, share the box in the workspace that your organization and Cloud Application Manager can access and attach the logs.

    • Linux: SSH and locate the log at /var/log/elasticbox/elasticbox-agent.log
    • Windows: RDP into the instance to locate the log at ProgramDataElasticBoxLogselasticbox-agent.log

    Deploy a Box

    Sample: Deploy a MongoDB instance via the API

    Here you can see how to deploy a mongoDB instance using the Cloud Application Manager API. Typically you want to structure API calls to mirror your workflow in Cloud Application Manager. Most workflows involve tasks such as these: defining a box, for example a Jenkins box to automate continuous integration and delivery; registering a provider like AWS, Google Cloud, vSphere, OpenStack, or CloudStack to host your box application deployments; creating a deployment profile to specify provider specific options for a deployment; deploying an instance to launch a box in the virtual environment; or performing lifecycle tasks like deploying, reconfiguring, and terminating an instance.

    In this sample, we follow this workflow to deploy a MongoDB instance using the existing MongoDB public box:

    • Declare deployment arguments
    • Authenticate with Cloud Application Manager
    • Create a deployment profile
    • Deploy a MongoDB instance
    • Terminate the instance

    Note: We use cURL commands to send HTTP requests to the API objects in JSON. JSON is the required format for all API requests and responses.

    Now let’s look at the script in sections to understand how you can make API calls from any code you like.

    Declare Deployment Arguments

    MongoDB deployment arguments such as username, password, environment, owner are declared as variables because they can differ between deployments. That way, each time you run the script, you can pass different arguments. In this case we decided to use AWS as provider so we will need the account key and secret to register it as provider. Those are variables too.

    aws_provider_key=1 $
    aws_provider_secret=2 $
    
    environment=3 $
    elasticBox_token=4 $
    owner=5 $
    
    username=1 $
    password=2 $
    

    Authenticate with Cloud Application Manager

    All API calls start with signing in to the Cloud Application Manager website and getting an authentication token. You use this token to perform tasks in your Cloud Application Manager workflow. In this example, we pass the token in the format as shown to all of the API requests that relate to deploying MongoDB.

    ElasticBox-Token:8ccc8203-2efd-44a9-8819-e95fd2277be2
    

    Create a Deployment Policy Box

    A deployment policy box is where you specify settings to deploy applications in a specific virtual environment. We send parameters for creating the deployment profile in a POST request to the Profiles object. If there's an error in creating the profile, we output the error. Else, we output the created profile.

    payload="{
            \"owner\": \"$owner\",
            \"schema\": \"http://elasticbox.net/schemas/boxes/policy\",
            \"claims\": [
            \"linux\"
            ],
            \"lifespan\": {
            \"operation\": \"none\"
            },
            \"automatic_updates\": \"off\",
            \"provider_id\": \"$provider_id\",
            \"name\": \"Deployment Policy Box Example\",
            \"description\": \"Just one example of deployment policy box creation via API\",
            \"profile\": {
            \"schema\": \"http://elasticbox.net/schemas/aws/ec2/profile\",
            \"flavor\": \"t1.micro\",
            \"location\": \"us-east-1\",
            \"instances\": 1,
            \"image\": \"Linux Compute\",
            \"keypair\": \"None\",
            \"cloud\": \"EC2\",
            \"security_groups\": [
    
            ],
            \"subnet\": \"us-east-1a\"
            }
            }"
    policy_box=$(curl -k -s \
            -X POST \
            -H "Content-Type:application/json" \
            -H "elasticBox-token:$elasticBox_token" \
            -H "elasticbox-release:4.0" \
            -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" \
            -H "Accept: application/json" \
            -H "Content-Type: application/json;charset=UTF-8" \
            -d "$payload" https://$environment/services/boxes)
    policy_box_id=$(echo $policy_box | python -c 'import json,sys; print json.load(sys.stdin)["id"]')
    if [ -z != $policy_box_id ]; then
            echo "Created Deployment Policy Box $policy_box_id"
    else
            echo "Error launching the Deployment Policy Box: $policy_box"
            exit 1
    fi;
    

    Deploy a MongoDB Instance

    In a POST request to the Instances object, we send along the deployment profile with other instance parameters to launch a MongoDB instance in the virtual environment.

    #Deploy the instance
    payload="{
        \"schema\": \"http://elasticbox.net/schemas/deploy-instance-request\",
        \"owner\": \"$owner\",
        \"name\": \"ScriptBoxSample\",
        \"box\": {
            \"id\": \"$mongo_box_id\",
            \"variables\": [
                {
                  \"name\": \"username\",
                  \"type\": \"Text\",
                  \"value\": \"$username\",
                  \"required\": true
                },
                {
                  \"name\": \"password\",
                  \"type\": \"Password\",
                  \"value\": \"$password\",
                  \"required\": true
                }
            ]
        },
        \"instance_tags\": [
    
        ],
        \"automatic_updates\": \"off\",
        \"policy_box\": {
            \"id\": \"$policy_box_id\",
            \"variables\": [
    
            ]
         }
    }"
    instance=$(curl -k -s \
        -X POST \
        -H "Content-Type:application/json" \
        -H "elasticBox-token:$elasticBox_token" \
        -H "elasticbox-release:4.0" \
        -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" \
        -H "Accept: application/json" \
        -H "Content-Type: application/json;charset=UTF-8" \
        -d "$payload" https://$environment/services/instances)
    instance_id=$(echo $instance | python -c 'import json,sys; print json.load(sys.stdin)["id"]')
    if [ -z != $instance_id ]; then
        echo "Deployed Instance $instance_id"
    else
        echo "Error deploying the Instance: $instance_id"
        exit 1
    fi;
    

    We store the response and check if the instance launched. If it failed to launch, we output an error or say that the instance is available and give its ID.

    While the instance is launching, we check its state every 30 seconds with a GET request to the Instances object by passing the instance ID. Then we evaluate whether to wait or continue: If it's still processing, we say so and wait or we output the current instance state and move to the next task.

    COUNTER=0
    while [ $COUNTER -lt $cycles_to_wait ]; do
      instance=$(curl -k -s \
        -X GET\
        -H "elasticBox-token:$elasticBox_token" \
        -H "elasticbox-release:4.0" \
        -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" \
        -H "Accept: application/json" \
        -H "Content-Type: application/json" \
        https://$environment/services/instances/${instance_id})
      instance_state=$(echo $instance | python -c 'import json,sys; print json.load(sys.stdin)["state"]')
      instance_operation=$(echo $instance | python -c 'import json,sys; print json.load(sys.stdin)["operation"]')
      if [[ "$instance_state" == "processing" ]]; then
        echo "The state of the Instance is $instance_state $instance_operation Waiting for it to be done or unavailable"
        let COUNTER=COUNTER+1
        sleep 30
      else
        echo "The state of the Instance is $instance_state $instance_operation. Process completed"
        break
      fi
    done
    

    Terminate the Instance

    To remove the instance from the virtual machine, we send a DELETE request to the Instances object with the instance ID. Then we check its response status. If it's 200, we say that the specific instance is terminated. Else, we output the error state from the response.

    status=$(curl -s -k \
      -X DELETE \
      -H "Accept: application/json" \
      -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" \
      -H "Content-Type:application/json" \
      -H "elasticBox-token:$elasticBox_token" \
      -H "elasticbox-release:4.0" \
      -w '%{http_code}' \
      -o /dev/null \
      https://$environment/services/instances/${instance_id}?operation=terminate)
    if [[ ! $status -eq 202 ]]; then
      echo "Error terminating the instance: Error $status"
      exit 1
    else
      echo "Terminated Instance $instance_id"
    fi
    

    While waiting for the instance to terminate, we do a GET on the Instances object with the instance ID to know the operation running on the instance and its current state. If it's processing, we say so and wait for it to complete or we output the operation that was run and the instance state.

    #Wait for the instance to be terminated
    COUNTER=0
    while [[ $COUNTER -lt 30 ]]; do
      instance=$(curl -k -s \
        -X GET \
        -H "Accept: application/json" \
        -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" \
        -H "Content-Type:application/json" \
        -H "elasticBox-token:$elasticBox_token" \
        -H "elasticbox-release:4.0" \
        https://$environment/services/instances/${instance_id})
      instance_state=$(echo $instance | python -c 'import json,sys; print json.load(sys.stdin)["state"]')
      instance_operation=$(echo $instance | python -c 'import json,sys; print json.load(sys.stdin)["operation"]')
      if [[ "$instance_state" == "processing" ]]; then
        echo "The state of the instance is $instance_state $instance_operation Waiting for it to be done or unavailable"
        let COUNTER=COUNTER+1
        sleep 30
      else
        echo "The state of the Instance is $instance_state $instance_operation"
        break
      fi
    done
    

    Lastly, we delete the instance and its logs from Cloud Application Manager by sending a DELETE request with the instance ID to the Instances object. Once done, we say that the instance is deleted. Similarly we delete the deployment policy box with a DELETE request to the Profiles object and confirm that it's done.

    #Remove the deployment policy box
    status=$(curl -s -k \
      -X DELETE \
      -H "Accept: application/json" \
      -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" \
      -H "Content-Type:application/json" \
      -H "elasticBox-token:$elasticBox_token" \
      -H "elasticbox-release:4.0" \
      -w '%{http_code}' \
      -o /dev/null \
      https://$environment/services/boxes/${policy_box_id})
    if [[ ! $status -eq 204 ]]; then
      echo "Error terminating the Deployment Policy Box: Error $status"
      exit 1
    else
      echo "Terminated Deployment Policy Box $policy_box_id"
    fi
    

    Contacting Cloud Application Manager Support

    We’re sorry you’re having an issue in Cloud Application Manager. Please review the troubleshooting tips, or contact Cloud Application Manager support with details and screenshots where possible.

    For issues related to API calls, send the request body along with details related to the issue.

    In the case of a box error, share the box in the workspace that your organization and Cloud Application Manager can access and attach the logs.

    • Linux: SSH and locate the log at /var/log/elasticbox/elasticbox-agent.log
    • Windows: RDP into the instance to locate the log at ProgramDataElasticBoxLogselasticbox-agent.log

    Instance Flow

    Using the API: from Registering a Provider to the Deployment of an Instance

    This guide shows all the steps you need to deploy a box using the Cloud Application Manager API.

    • Authentication and Deployment Variables
    • Register a Provider
    • Create a New Deployment Policy Box
    • Create a Box
    • Deploy the Instance
    • Terminate the Instance

    Note: We use cURL commands to send HTTP requests to the API objects in JSON. JSON is the required format for all API requests and responses.

    Now let’s look at the script in sections to understand how you can make API calls from any code you like.

    Authenticate with Cloud Application Manager

    Before calling to the API you have to sig in into the Cloud Application Manager website and getting an authentication token. You use this token as an http header to perform every call to the Cloud Application Manager API.

    Declare Deployment Variables

    In this case we decided to use AWS so we will need the account key and secret to register it as provider. Box deployment arguments such as owner, environment and token are declared as variables because they can differ between deployments. That way, each time you run the script, you can pass different arguments.

    aws_provider_key=1 $
    aws_provider_secret=2 $
    environment=3 $
    elasticBox_token=4 $
    owner=5 $
    

    Register a Provider in Cloud Application Manager

    A provider is a public or private cloud account you can register in Cloud Application Manager. In this case we choose AWS as provider. From the AWS account credential we will need the key and the secret right now.

    # Register the provider in Cloud Application Manager
    payload="{
      \"icon\": \"images/platform/aws.png\",
      \"type\": \"Amazon Web Services\",
      \"description\": \"Manage EC2, ECS and Cloudformation instances\",
      \"schema\": \"http://elasticbox.net/schemas/aws/provider\",
      \"name\": \"AWS Example Provider via CURL\",
      \"credentials\": {
        \"key\": \"$example_provider_key\",
        \"secret\": \"$example_provider_secret\"
      },
      \"owner\": \"$owner\"
    }"
    provider=$(curl -k -s \
        -X POST \
        -H "elasticBox-token:$elasticBox_token" \
        -H "elasticbox-release:4.0" -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" \
        -H "Accept: application/json, text/plain, */*" \
        -H "Accept-encoding: gzip, deflate" \
        -H "Content-Type: application/json" \
        -d "$payload" https://$environment/services/providers)
    provider_id=$(echo $provider | python -c 'import json,sys; print json.load(sys.stdin)["id"]')
    if [ -z != $provider_id ]; then
        echo "Created provider $provider_id"
    else
        echo "Error creating the provider: $provider"
    fi;
    

    Create a New Deployment Policy Box

    A deployment policy box is where you specify settings to deploy applications in a specific virtual environment. We send parameters for creating the deployment policy box in a POST request to the box object. If there's an error in creating the policy box, we output the error. Else, we output the created box.

    # Once we have created the provider we can set the proper policy box
    payload="{
      \"owner\": \"$owner\",
      \"schema\": \"http://elasticbox.net/schemas/boxes/policy\",
      \"claims\": [
        \"linux\"
      ],
      \"lifespan\": {
        \"operation\": \"none\"
      },
      \"automatic_updates\": \"off\",
      \"provider_id\": \"$provider_id\",
      \"name\": \"Deployment Policy Box Example\",
      \"description\": \"Just one example of deployment policy box creation via API\",
      \"profile\": {
        \"schema\": \"http://elasticbox.net/schemas/aws/ec2/profile\",
        \"flavor\": \"t1.micro\",
        \"location\": \"us-east-1\",
        \"instances\": 1,
        \"image\": \"Linux Compute\",
        \"keypair\": \"None\",
        \"cloud\": \"EC2\",
        \"security_groups\": [
    
        ],
        \"subnet\": \"us-east-1a\"
      }
    }"
    policy_box=$(curl -k -s \
        -X POST \
        -H "Content-Type:application/json" \
        -H "elasticBox-token:$elasticBox_token" \
        -H "elasticbox-release:4.0" -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" \
        -H "Accept: application/json, text/plain, */*" \
        -H "Accept-encoding: gzip, deflate" \
        -H "Content-Type: application/json;charset=UTF-8" \
        -d "$payload" https://$environment/services/boxes)
    policy_box_id=$(echo $policy_box | python -c 'import json,sys; print json.load(sys.stdin)["id"]')
    if [ -z != $policy_box_id ]; then
        echo "Created policy_box $policy_box_id"
    else
        echo "Error launching the policy_box: $policy_box"
    fi;
    

    Create a Custom Box in Order to Deploy It Using the Previous Deployment Policy Box

    In a POST request to the Box object, we send the features for our script box. Also we will use two already created blobs. You can take a look to the blobs, API doc if you need to know how you can create them.

    # We create a box to deploy with that policy box, in this case we are going to use a previously uploaded scripts.
    payload="{
      \"automatic_updates\": \"off\",
      \"requirements\": [
    
      ],
      \"description\": \"sample box created via API\",
      \"name\": \"ScriptBoxSample\",
      \"deleted\": null,
      \"variables\": [
        {
          \"required\": true,
          \"type\": \"Text\",
          \"name\": \"variable_name\",
          \"value\": \"variable_value\",
          \"visibility\": \"public\"
        }
      ],
      \"visibility\": \"workspace\",
      \"members\": [
    
      ],
      \"owner\": \"$owner\",
      \"organization\": \"elasticbox\",
      \"events\": {
        \"configure\": {
          \"url\": \"/services/blobs/download/5631fa7614841250525226cc/configure\",
          \"length\": 5,
          \"destination_path\": \"scripts\",
          \"content_type\": \"text/x-shellscript\"
        },
        \"install\": {
          \"url\": \"/services/blobs/download/5631fa6614841250525226ca/install\",
          \"length\": 5,
          \"destination_path\": \"scripts\",
          \"content_type\": \"text/x-shellscript\"
        }
      },
      \"schema\": \"http://elasticbox.net/schemas/boxes/script\"
    }"
    box=$(curl -k -s \
        -X POST \
        -H "Content-Type:application/json" \
        -H "elasticBox-token:$elasticBox_token" \
        -H "elasticbox-release:4.0" -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" \
        -H "Accept: application/json, text/plain, */*" \
        -H "Accept-encoding: gzip, deflate" \
        -H "Content-Type: application/json;charset=UTF-8" \
        -d "$payload" https://$environment/services/boxes) \
    box_id=$(echo $box | python -c 'import json,sys; print json.load(sys.stdin)["id"]')
    if [ -z != $box_id ]; then
        echo "Created box $box_id"
    else
        echo "Error launching the box: $box"
    fi;
    

    Deploy the Instance

    To remove the instance from the virtual machine, we send a DELETE request to the Instances object with the instance ID. Then we check its response status. If it's 200, we say that the specific instance is terminated. Else, we output the error state from the response.

    # Finally we are going to deploy the instance
    payload="{
        \"schema\": \"http://elasticbox.net/schemas/deploy-instance-request\",
        \"owner\": \"$owner\",
        \"name\": \"ScriptBoxSample\",
        \"box\": {
            \"id\": \"$box_id\",
            \"variables\": [
            ]
        },
        \"instance_tags\": [
    
        ],
        \"automatic_updates\": \"off\",
        \"policy_box\": {
            \"id\": \"$policy_box_id\",
            \"variables\": [
    
            ]
         }
    }"
    instance=$(curl -k -s \
        -X POST \
        -H "Content-Type:application/json" \
        -H "elasticBox-token:$elasticBox_token" \
        -H "elasticbox-release:4.0" -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" \
        -H "Accept: application/json, text/plain, */*" \
        -H "Accept-encoding: gzip, deflate" \
        -H "Content-Type: application/json;charset=UTF-8" \
        -d "$payload" https://$environment/services/instances)
    instance_id=$(echo $instance | python -c 'import json,sys; print json.load(sys.stdin)["id"]')
    if [ -z != $instance_id ]; then
        echo "Deployed instance $instance_id"
    else
        echo "Error deploying the instance: $instance_id"
    fi;
    

    Terminate the Instance

    To remove the instance from the virtual machine, we send a DELETE request to the Instances object with the instance ID. Then we check its response status. If it's 200, we say that the specific instance is terminated. Else, we output the error state from the response.

    curl -k -s \
    -X DELETE \
    -H "elasticBox-token:$elasticBox_token" \
    -H "elasticbox-release:4.0" \
    -A "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30" \
    -H "Accept: application/json, text/plain, */*" \
    -H "Accept-encoding: gzip, deflate" \
     https://$environment/services/instances/$instance_id
    
    echo "Undeployed box: $instance_id"
    

    Contacting Cloud Application Manager Support

    We’re sorry you’re having an issue in Cloud Application Manager. Please review the troubleshooting tips, or contact Cloud Application Manager support with details and screenshots where possible.

    For issues related to API calls, send the request body along with details related to the issue.

    In the case of a box error, share the box in the workspace that your organization and Cloud Application Manager can access and attach the logs.

    • Linux: SSH and locate the log at /var/log/elasticbox/elasticbox-agent.log
    • Windows: RDP into the instance to locate the log at ProgramDataElasticBoxLogselasticbox-agent.log