API Overview and Access
Overview
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, Authorization, 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.
Authorization
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
-
Sign in to the Cloud Application Manager website.
-
From the user drop-down menu on the right, click Authentication Tokens.
-
Enter a descriptive name for the token and click Create Token.
-
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
Authorization:Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJvcGVyYXRpb25zIiwianRpIjoiNjk0YTgzMTgtZjZlMy00MDA5LTgxNTItYzdlNTE0NzFlMzU3IiwiZXhwIjoxNTExMzY3ODYxLCJvcmdhbml6YXRpb24iOiJlbGFzdGljYm94IiwiaWF0IjoxNTEwMDcxODYxLCJ0eXBlIjoidXNlciIsIm5hbWUiOiJPcGVyYXRpb25zIEVsYXN0aWNCb3gifQ.hob7M5swTflmbsw_iGe94FPnFgBvWbVKscvKN8Ij_4AgRj7PFrYVIwW8Xyd-PIuDKWLe3cGGE0Hz8g6KdDUMzbfp-dXk4JjqyenejCA-UTF9dv1z-pWt69IevRNR5XdYR5iVff4-Yy33RMaeWHaLuYTbOQHjVI2MDB7shlOCx4sERDtd31OyD6ZjNgRMLLDR0AFLTj2KRDleoH8iG0yXodD0AVk0iAcBCaakgZR5ROAZDb3SoSpsKYPS4dC-eWd_s0VgdYaWOd1jI0ev66-oPgSul9kAuIjozyNZ3s4vW0i-8Y5sH4lTWgMqTmf3lmjA6e2sj5lV9-boE3k3ALJwPg
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
Removed
|
Boxes | Changed The boxes endpoint accepts four box types now. When you call a box, use one of the following schemas:
Removed Parameters:
|
Workspaces | Removed This particular operation on the workspaces endpoint:
|
Profiles | Removed All operations on the profiles endpoint are deprecated and replaced by deployment policy boxes
|
Organizations | Removed
|
Providers | Removed
|
Instances
Endpoint
PUT /services/instances/{instance_id}/pull
New endpoint that updates an active instance by applying a box version.
Request
Parameter | Type | Description |
---|---|---|
box_id | string | Required. ID of the box version used to update the instance. The version should relate to the box currently deployed on the instance. |
Response
None.
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 | string | 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 | object | 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 | object | Optional. Requires these properties:
|
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 | object | Required. Describes all the properties to deploy an instance of a box. Contains the same data as the old deployment profile endpoint. |
provider_id | object | 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 | string | 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 | object | 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 | string | Required. Specify an option: off, major, minor, or patch. Default is off. |
provider_id | object | Required. Specifies the ID of an AWS provider. |
type | object | 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 | object | 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 | string | 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.
Request
None.
Response
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
Request
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"
}
Response
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 | string | Required. Specify an option: off, major, minor, or patch. Default is off. |
box | string | Required. ID of the box (not version) deployed on the instance. |
policy_box | string | Optional. Is a deployment policy or a CloudFormation box. |
Request
None.
Response
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 | string | Required. Specify an option: off, major, minor, or patch. Default is off. |
box | object | Required. Contains two parameters:
|
policy_box | object | Required. Contains two parameters:
|
instance_tags | Array | Optional. Custom tags to describe an instance. |
ipv4_address | string | Optional. IP address of the machine where you want to run the Cloud Application Manager agent to deploy a box. |
Request
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"
}
Response
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
Request
None.
Response
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
Request
None.
Response
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
Resource | 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
Resource | 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} | Deletes an existing machine image from a provider. |
POST /services/providers
Creates a new provider account in Cloud Application Manager and gets the status of the provider.
URL
Structure
[POST] /services/providers
Example
POST https://cam.ctl.io/services/providers
Request
Headers
content-type:application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
Request parameters for all providers
Parameter | Type | Description |
---|---|---|
icon | string | Specify an icon URI for the provider account. |
type | string | Required. Specify the account type as one of the following: Amazon Web Services, Amazon Web Services GovCloud, Rackspace, Openstack, VMware vSphere, VMware vCloud Director, Google Compute, Microsoft Azure, Microsoft Azure Classic, Cloudstack, SoftLayer, CenturyLink, CenturyLink DCC, CenturyLink DCC Foundation, Dimension Data. |
description | string | Describe the services from the provider. |
schema | string | Required. Provide the schema for the request. |
name | string | Required. Give the provider account a name in Cloud Application Manager. |
owner | string | Specify the workspace ID in Cloud Application Manager who owns the provider account. |
Amazon Web Services request parameters
Parameter | Type | Description |
---|---|---|
credentials | object | 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 | object | Required (key-secret or role). 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"
}
{
"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": {
"role": "arn:aws:iam::63659945208:role/Cam_Access"
},
"owner": "operations"
}
Rackspace and OpenStack request parameters
Parameter | Type | Description |
---|---|---|
identity_url | string | Required. Specify the identity service endpoint. |
project | string | Required. Specify the project ID for Rackspace or the tenant for OpenStack. |
username | string | Required. Specify the username. |
password | string | 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"
}
VMware vSphere request parameters
Parameter | Type | Description |
---|---|---|
username | string | Required. Specify a vCenter username. |
secret | string | Required. Specify the user’s password. |
endpoint | string | Required. Specify the vCenter server URL. |
VMware 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"
}
VMware vCloud Director request parameters
Parameter | Type | Description |
---|---|---|
username | string | Required. Specify a vCenter username. |
password | string | Required. Specify the user’s password. |
url | string | Required. Specify the vCenter server URL. |
organization | string | Required. Organization. |
VMware vCloud Director 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 | string | Required. Specify a project ID in Google Cloud that has billing and the Google Compute Engine API enabled. |
string | Required. Specify your Gmail account associated with Google Cloud. | |
credentials | object | 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"
}
Microsoft Azure Classic 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 Classic.
Parameter | Type | Description |
---|---|---|
subscription_id | string | Required. Specify the Azure subscription ID. |
Microsoft Azure Classic 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"
}
Microsoft 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_id | string | Required. Specify the Azure subscription ID. |
client_id | string | Only required for normal users. The resellers doesn't require this field. |
secret | string | The secret key that will be provided by Azure for the user |
tenant | string | The tenant instance specified in Azure panel. |
Microsoft 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-arm/provider",
"name": "example azure",
"owner": "mrina",
"subscription_id": "",
"client_id": "",
"secret": "",
"tenant": "1728acb8-cf75-45d8-bf56-ec39873b7e1b"
}
CloudStack request parameters
Parameter | Type | Description |
---|---|---|
url | string | Required. Specify the API endpoint to the CloudStack management server. |
api_key | string | Required. Specify the API key for the CloudStack user account. |
secret_key | string | 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 | string | Required. Specify a SoftLayer account username. |
api_key | string | 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
Normal Code
- 202 accepted
Error Codes
- No error code
Response parameters for all providers
Parameter | Type | Description |
---|---|---|
updated | string | Returns the date the provider was updated. |
description | string | Returns the description for the provider. |
deleted | object | 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 | string | Returns the provider account owner in Cloud Application Manager. |
id | string | Returns the ID of the provider account in Cloud Application Manager. |
icon | string | Returns the icon used for the provider account. |
name | string | Returns the name used to identify the provider account in Cloud Application Manager. |
created | string | Returns the date that the provider was added. |
uri | string | Returns the unique resource identifier path to the provider account. |
admin_boxes | string | Lists the admin boxes attached to the provider. |
organization | string | Identifies the name of the organization. |
type | string | Identifies the provider as one of the following: Amazon Web Services, Rackspace, Openstack, VMware vSphere, Google Compute, Microsoft Azure, Cloudstack, SoftLayer. |
schema | string | Returns the schema URL. |
AWS response parameters
Parameter | Type | Description |
---|---|---|
credentials | object | 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 | string | Returns the username. |
password | string | Masks the password for the provider account. |
project | string | Returns the Rackspace project ID or the OpenStack tenant. |
identity_url | string | 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 | string | Returns the vCenter username. |
secret | string | Masks the user’s password. |
endpoint | string | 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": [Provider id
],
"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 | string | Returns the project ID in Google Cloud that the provider account uses. |
string | Returns the Gmail account associated with Google Cloud for the provider account. | |
credentials | object | 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"
}
Microsoft Azure Classic response parameters
Parameter | Type | Description |
---|---|---|
subscription_id | string | Returns the Azure subscription ID that the provider account uses. |
Microsoft Azure Classic 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": "Azure Classic",
"id": "57b41251-43fd-4a18-9182-c71db30f9035",
"schema": "http://elasticbox.net/schemas/azure/provider"
}
Microsoft 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-XXXXXXXXX",
"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-XXXXXXXXXX",
"schema": "http://elasticbox.net/schemas/azure/provider"
"client_id": "_client_id",
"secret": "_secret",
"tenant": "1728acb8-cf75-45d8-bf56-XXXXXXXXX"
}
CloudStack response parameters
Parameter | Type | Description |
---|---|---|
url | string | Returns the API endpoint to the CloudStack management server. |
api_key | string | Returns the API key for the CloudStack user account. |
secret_key | string | 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 | string | Returns the SoftLayer username the provider account uses. |
api_key | string | 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.
URL
Structure
[GET] /services/providers
Example
GET https://cam.ctl.io/services/providers
Request
Headers
content-type:application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Name | Type | Description | Req. |
---|---|---|---|
-------- | ------- | --------------- | ----- |
Response
Normal Code
- 200 accepted
Error Codes
- 400: Bad Request
Response parameters
Parameter | Type | Description |
---|---|---|
updated | string | Date of the last update. |
description | string | Provider description. |
created | string | Creation date. |
uri | string | Provider uri. |
name | string | Provider name. |
services | array | List of services associated to the provider, each service has a name. |
state | string | Provider state, there are five possible states: initializing , processing , ready , deleting or unavailable. |
members | array | List of members with access to the provider. |
owner | string | Provider owner. |
type | string | Provider type, there are the available providers: Amazon Web Services (AWS), VShpere, VCloud, RackSpace, Openstack, Google Compute, Azure, CloudStack, Softlayer, AWS Gov. |
id | string | Provider unique identificator. |
icon | string | Provider Icon uri. |
schema | string | The uri schema of the right provider. |
Response body
[
{
"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"
},
{
"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"
},
{
"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": [
{
"name": "scenarios-cluster",
"arn": "arn:aws:ecs:us-east-1:729190825118:cluster/scenarios-cluster"
}
]
}
]
},
{
"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"
}
]
GET /services/providers/{provider_id}
Fetches an existing provider when you give the provider ID.
URL
Structure
[GET] /services/providers/{provider_id}
Example
GET https://cam.ctl.io/services/providers/338f38dc-e667-47e0-9026-b253138f109e
Request
Headers
content-type:application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Name | Type | Description | Req. |
---|---|---|---|
provider_id | string | The id of the provider | Yes |
Response
Normal Code
- 202 Accepted
Error Codes
- 403: Forbidden
- 404: Not Found
Response parameters
Parameter | Type | Description |
---|---|---|
updated | string | Date of the last update. |
description | string | Provider description. |
created | string | Creation date. |
uri | string | Provider uri. |
name | string | Provider name. |
services | array | List of services associated to the provider, each service has a name. |
state | string | Provider state, there are five possible states: initializing , processing , ready , deleting or unavailable. |
members | array | List of members with access to the provider. |
owner | string | Provider owner. |
type | string | Provider type, there are the available providers: Amazon Web Services (AWS), VShpere, VCloud, RackSpace, Openstack, Google Compute, Azure, CloudStack, Softlayer, AWS Gov. |
id | string | Provider unique identificator. |
schema | string | The provider type schema uri. |
icon | string | Provider Icon uri. |
Response Body
{
"costcenter": "c3195962-4c70-4ad6-a17a-189a5579a45a",
"owner": "dryrun",
"default_managed_iis_policies_created": true,
"clc_alias": "DA4",
"management_state": true,
"id": "8132cc1d-38b0-4867-b7a3-1af7b83d4792",
"state": "ready",
"admin_boxes": [],
"type": "Amazon Web Services",
"managed_os": true,
"schema": "http://elasticbox.net/schemas/aws/provider",
"updated": "2018-10-15 19:10:57.749750",
"description": null,
"management_state_history": [
{
"started": "2018-04-06 00:29:28.414938",
"state": "up",
"completed": "2018-07-26 18:43:46.867016"
},
{
"started": "2018-07-26 18:43:46.867016",
"state": "down",
"completed": "2018-07-26 18:53:27.827179"
}
],
"default_sql_server_policies_created": true,
"deleted": null,
"default_management_appliance_policies_created": true,
"default_policies_created": true,
"members": [
{
"role": "read",
"workspace": "mission5"
}
],
"services": [
{
"icon": "images/platform/aws-cloudformation.png",
"locations": [
{
"name": "ap-northeast-1"
},
{
"name": "ap-northeast-2"
}
],
"name": "CloudFormation Service",
"schema": "http://elasticbox.net/schemas/aws/cloudformation/cloudformation"
},
{
"locations": [
{
"clusters": [],
"name": "ap-northeast-1"
},
{
"name": "ap-northeast-2"
}
],
"icon": "images/platform/amazon-ecs.png",
"name": "Container Service",
"roles": [
{
"name": "None"
}
],
"schema": "http://elasticbox.net/schemas/aws/ecs/container"
},
{
"flavors": [
{
"name": "c1.medium"
},
{
"name": "c1.xlarge"
}
],
"name": "Linux Compute",
"roles": [
{
"name": "None"
},
{
"name": "AutoScaleS3Access"
}
],
"locations": [
{
"clouds": [
{
"subnets": [
{
"description": "172.31.16.0/20",
"name": "subnet-ygygjyg"
},
{
"description": "172.31.0.0/20",
"name": "subnet-97ty97h"
}
],
"description": "172.31.0.0/16",
"target_groups": [],
"load_balancers": [],
"security_groups": [
{
"name": "Automatic"
},
{
"description": "default VPC security group",
"name": "sg-40c1ea39"
}
],
"name": "vpc-9ff879f8"
}
],
"name": "ap-northeast-1",
"placement_groups": [],
"images": [
{
"owner": "user",
"description": "Latest Amazon AMI",
"name": "Linux Compute"
},
{
"owner": "user",
"description": "CentOS 7 for Management Appliance",
"root_disk": {
"device": "/dev/sda1",
"iops": null,
"type": "gp2",
"size": 8
},
"name": "ami-3185744e"
}
],
"alarms": [],
"keypairs": [
{
"name": "None"
}
]
}
],
"certificates": [],
"schema": "http://elasticbox.net/schemas/aws/compute/linux",
"icon": "images/platform/linux.png"
},
],
"credentials": {
"role": "arn:aws:iam::6366654466:role/Cam_Access"
},
"icon": "images/platform/aws.svg",
"target_regions": [
{
"appliance_id": "***********",
"name": "us-east-1",
"vpc": "************"
}
],
"name": "Dry-Run AWS",
"reseller": false,
"created": "2018-03-16 16:17:59.531589",
"uri": "/services/providers/8132cc1d-38b0-4867-b7a3-1af7b83d4792",
"organization": "mission-field"
}
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, Sftlayer you can also update the username, secret, and endpoint.
URL
Structure
[PUT] /services/providers/{provider_id}
Example
PUT https://cam.ctl.io/services/providers/338f38dc-e667-47e0-9026-b253138f109e
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
provider_id | string | The unique id of the created provider | Yes |
Response
Normal Response Codes
- 200 Accepted
Common Error Response Codes
- 400: Bad Request - Invalid Data
- 403: Forbidden - User doesn’t belong to the organization
- 404: Not Found
- 409: Conflict
Response Parameters
Parameter | Type | Description |
---|---|---|
updated | string | Date of the last update. |
description | string | Provider description. |
created | string | Creation date. |
uri | string | Provider uri. |
name | string | Provider name. |
services | array | List of services associated to the provider, each service has a name. |
state | string | Provider state, there are five possible states: initializing , processing , ready , deleting or unavailable . |
members | array | List of members with access to the provider. |
owner | string | Provider owner. |
type | string | Provider type, there are two possible providers: Amazon Web Services or VMware vShpere. |
id | string | Provider unique identifier. |
icon | string | Provider Icon uri. |
Response Body
{
"costcenter": "c3195962-4c70-4ad6-a17a-189a5579a45a",
"owner": "dryrun",
"default_managed_iis_policies_created": true,
"clc_alias": "DA4",
"management_state": true,
"id": "8132cc1d-38b0-4867-b7a3-1af7b83d4792",
"state": "ready",
"admin_boxes": [],
"type": "Amazon Web Services",
"managed_os": true,
"schema": "http://elasticbox.net/schemas/aws/provider",
"updated": "2018-10-15 19:10:57.749750",
"description": null,
"management_state_history": [
{
"started": "2018-04-06 00:29:28.414938",
"state": "up",
"completed": "2018-07-26 18:43:46.867016"
},
{
"started": "2018-07-26 18:43:46.867016",
"state": "down",
"completed": "2018-07-26 18:53:27.827179"
}
],
"default_sql_server_policies_created": true,
"deleted": null,
"default_management_appliance_policies_created": true,
"default_policies_created": true,
"members": [
{
"role": "read",
"workspace": "mission5"
}
],
"services": [
{
"icon": "images/platform/aws-cloudformation.png",
"locations": [
{
"name": "ap-northeast-1"
},
{
"name": "ap-northeast-2"
}
],
"name": "CloudFormation Service",
"schema": "http://elasticbox.net/schemas/aws/cloudformation/cloudformation"
},
{
"locations": [
{
"clusters": [],
"name": "ap-northeast-1"
},
{
"name": "ap-northeast-2"
}
],
"icon": "images/platform/amazon-ecs.png",
"name": "Container Service",
"roles": [
{
"name": "None"
}
],
"schema": "http://elasticbox.net/schemas/aws/ecs/container"
},
{
"flavors": [
{
"name": "c1.medium"
},
{
"name": "c1.xlarge"
}
],
"name": "Linux Compute",
"roles": [
{
"name": "None"
},
{
"name": "AutoScaleS3Access"
}
],
"locations": [
{
"clouds": [
{
"subnets": [
{
"description": "172.31.16.0/20",
"name": "subnet-231b2d0b"
},
{
"description": "172.31.0.0/20",
"name": "subnet-af8e04f4"
}
],
"description": "172.31.0.0/16",
"target_groups": [],
"load_balancers": [],
"security_groups": [
{
"name": "Automatic"
},
{
"description": "default VPC security group",
"name": "sg-40c1ea39"
}
],
"name": "vpc-9ff879f8"
}
],
"name": "ap-northeast-1",
"placement_groups": [],
"images": [
{
"owner": "user",
"description": "Latest Amazon AMI",
"name": "Linux Compute"
},
{
"owner": "user",
"description": "CentOS 7 for Management Appliance",
"root_disk": {
"device": "/dev/sda1",
"iops": null,
"type": "gp2",
"size": 8
},
"name": "ami-3185744e"
}
],
"alarms": [],
"keypairs": [
{
"name": "None"
}
]
},
{
"clouds": [
{
"subnets": [
{
"description": "172.31.0.0/20",
"name": "subnet-9ecc86f6"
},
{
"description": "172.31.16.0/20",
"name": "subnet-1dee5651"
}
],
"description": "172.31.0.0/16",
"target_groups": [],
"load_balancers": [],
"security_groups": [
{
"name": "Automatic"
},
{
"description": "default VPC security group",
"name": "sg-ff282394"
}
],
"name": "vpc-08296b60"
}
],
"name": "ap-northeast-2",
"placement_groups": [],
"images": [
{
"owner": "user",
"description": "Latest Amazon AMI",
"name": "Linux Compute"
},
{
"owner": "user",
"description": "CentOS 7 for Management Appliance",
"root_disk": {
"device": "/dev/sda1",
"iops": null,
"type": "gp2",
"size": 8
},
"name": "ami-46963e28"
}
],
"alarms": [],
"keypairs": [
{
"name": "None"
}
]
}
],
"certificates": [],
"schema": "http://elasticbox.net/schemas/aws/compute/windows",
"icon": "images/platform/windows.png"
}
],
"credentials": {
"role": "arn:aws:iam::636534623543:role/Cam_Access"
},
"icon": "images/platform/aws.svg",
"target_regions": [
{
"appliance_id": "*********",
"name": "us-east-1",
"vpc": "**************"
}
],
"name": "Dry-Run AWS",
"reseller": false,
"created": "2018-03-16 16:17:59.531589",
"uri": "/services/providers/8132cc1d-38b0-4867-b7a3-1af7b83d4792",
"organization": "mission-field"
}
DELETE /services/providers/{provider_id}
Deletes an existing provider when you give the provider ID.
URL
Structure
[DELETE] /services/providers/{provider_id}
Example
DELETE https://cam.ctl.io/services/providers/338f38dc-e667-47e0-9026-b253138f109e
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|
| provider_id | string | The unique id that given to each provider | Yes |
Response
Normal Response Codes
- 202 Accepted
Common Error Response Codes
- 400: Bad Request - Invalid Data
- 400: Bad Request - Active service using the provider
- 403: Forbidden
- 404: Not Found
PUT /services/providers/{provider_id}/sync
Syncs an existing provider when you give the provider ID.
URL
Structure
[PUT] /services/providers/{provider_id}/sync
Example
PUT https://cam.ctl.io/services/providers/338f38dc-e667-47e0-9026-b253138f109e/sync
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|
| provider_id | string | The unique id that given to each provider | Yes |
Response
Normal Response Codes
- 202 Accepted
Common Error Response Codes
- 403: Forbidden - User doesn’t belong to the organization
- 404: Not Found
GET /services/providers/{provider_id}/logs
Retrieves the logs of a provider when you give the provider ID.
URL
Structure
[GET] /services/providers/{provider_id}/logs
Example
GET https://cam.ctl.io/services/providers/338f38dc-e667-47e0-9026-b253138f109e/logs
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|
| provider_id | string | The unique id that given to each provider | Yes |
Response
Normal Response Codes
- 200 Accepted
Common Error Response Codes
- 403: Forbidden - User doesn’t belong to the organization
- 404: Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
workspace | string | Id of the workspace who perform the action. |
provider_id | string | Provider unique identifier. |
created | string | Creation date. |
text | string | Profiver-log action description. |
level | integer | Provider-log action level. |
updated | array | Date of the update. |
id | string | Provider unique identifier. |
schema | string | Provider-log schema url. |
Response Body
[
{
provider_id: "72626gg12d-38b0-4867-b7a3-1af7b83d4792",
level: 40,
text: "Amazon Web Services Management Console was accessed",
created: "2018-10-22 07:30:47.808486",
updated: "2018-10-22 07:30:47.808621",
role: "arn:aws:iam::636588615608:role/ElasticBox_Access",
workspace: "thomasbroadwell",
request_id: "e09360e1-7738-4cd9-91f2-dhh7883253fv",
operation: "console_access",
id: "231373e4-ab8f-4c28-8ba6-i981fhgw6923gs9",
schema: "http://elasticbox.net/schemas/provider-log"
},
{
provider_id: "8132cc1d-38b0-4867-b1hsh-1af7b83d4792",
level: 40,
text: "Image ami-2051294a in location us-east-1 added successfully.",
created: "2018-10-15 19:10:57.765608",
updated: "2018-10-15 19:10:57.766848",
workspace: "msa_service_account1",
request_id: "77aac7887c1-1655-4e09-a500-0ccf83161eec",
operation: "sync",
id: "b87672c001d-64c4-4103-ac0b-92927373f",
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.
URL
Structure
[GET] /services/providers/{provider_id}/unregisted-instances
Example
GET https://cam.ctl.io/services/providers/338f38dc-e667-47e0-9026-b253138f109e/unregisted-instances
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
provider_id | string | The unique id that given to each provider | Yes |
Response
Normal Response Codes
- 200 Accepted
Common Error Response Codes
- 403: Forbidden - User doesn’t belong to the organization
- 404: Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
profile | object | Instance profile. (the profile object depends on provider, has different sub-object) |
provider_id | string | Instance provider unique identifier. |
name | string | Instance name. |
created | string | Creation date. |
deleted | string | Logical deletion date. |
type | string | Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service. |
server_info | object | Instance public and private ips and public dns. |
updated | array | Date of the update. |
power_state | string | Can be running or stopped. |
organization | string | Organization to which instance belongs. |
external_id | string | Instance external id. |
id | string | Instance unique identifier. |
schema | string | Unregistered-instance schema url. |
Response Body
[
{
profile: {
location: "us-west-2",
service: "cloudtrail",
schema: "http://elasticbox.net/schemas/aws/native-service/profile"
},
schema: "http://elasticbox.net/schemas/unregistered-instance",
provider_id: "34g4-38b0-4867-b7a3-a8827f662g1b",
description: "S3 Bucket: partsultd-cloudtrail",
created: "2018-09-24 16:10:06.198406",
deleted: null,
type: "Native Service",
server_info: { },
updated: "2018-09-24 16:22:18.000760",
stack_id: null,
autoscaling_group: null,
power_state: "running",
organization: "mission-field",
external_id: "MissionField-Mgmt",
id: "451873d3-07cb-450d-b20d-183g3189d2001f",
name: "PartsUltdAPILogs-Mgmt"
}
]
POST /services/providers/{provider_id}/images
Adds a new machine image to a provider when you give the provider ID. Only Supported by AWS and Azure.
URL
Structure
[POST] /services/providers/{provider_id}/images
Example
POST https://cam.ctl.io/services/providers/338f38dc-e667-47e0-9026-b253138f109e/images
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
provider_id | string | The unique id that given to each provider | Yes |
Request Body Parameters
Parameter | Type | Description |
---|---|---|
location | string | Image region. |
name | string | Image name. |
description | string | Image description. |
Request Body
{
"location":"us-east-1",
"name":"ami-3275ee5b",
"description":"New Image Description"
}
Response
Normal Response Codes
- 202 Accepted
Common Error Response Codes
- 400: Bad Request - Request missing, incomplete or includes invalid properties (details provided inside body)
- 403: Forbidden - User doesn’t belong to the organization
- 404: Not Found
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.
URL
Structure
[DELETE] /services/providers/{provider_id}/images/{machine_image_id}
Example
DELETE https://cam.ctl.io/services/providers/338f38dc-e667-47e0-9026-b253138f109e/images/b253138f109e?location=us-east-1
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
provider_id | string | The unique id that given to each provider | Yes |
Request Body Parameters
Parameter | Type | Description |
---|---|---|
location | string | Region of the machine image to be deleted. |
Response
Normal Response Codes
- 202 Accepted
Common Error Response Codes
- 400: Bad Request - Request missing, incomplete or includes invalid properties (details provided inside body)
- 403: Forbidden - User doesn’t belong to the organization
- 404: Not Found
GET /services/providers/{provider_id}/search/images"
Deletes an existing machine image when you give the provider ID and the machine image ID.
URL
Structure
[GET] GET /services/providers/{provider_id}/search/images
Example
GET https://cam.ctl.io/services/providers/de5524a3-94f4-406b-a878-c9600bf3ed1a/search/images?publisher=4psa&offer=voipnow
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
provider_id | string | The unique id that given to each provider | Yes |
publisher | string | The publisher unique number | No |
offer | string | The offer number | No |
Response
If no publisher is in query string
{
"publishers": [
"128technology",
"1e",
"4psa",
"5nine-software-inc",
"7isolutions",
"a10networks",
"a10_networks-5255398",
...
}
if publisher has offers
{
offers: [
"voipnow"
]
}
Normal Response Codes
- 202 Accepted
Common Error Response Codes
- 400: Bad Request - Operation not supported for XXXXXXXXXXX
- 500: Internal Server Error - Critical error while processing request: XXXXXXXXXXX
- 404: Not Found - Provider with ID XXXXXXXXXXX cannot be found
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
Cost Centers API
Manage Cost Centers
Resource | Description |
---|---|
POST /services/costcenters | Creates a Cost Center. |
GET /services/costcenters/{costcenter_id} | Fetches an existing Cost Center. |
PUT /services/costcenters/{costcenter_id} | Updates an existing Cost Center. |
DELETE /services/costcenters/{costcenter_id} | Deletes an existing Cost Center. |
POST /services/costcenters
Creates a new Cost Center and gets the created Cost Center
URL
Structure
[POST] /services/costcenters
Example
[POST] https://cam.ctl.io/services/costcenters
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
- None
Request body parameters
Name | Type | Description | Req. |
---|---|---|---|
name | string | Cost Center name. | Yes |
organization | string | Name of the organization with access to the Cost Center. | Yes |
schema | string | Cost Center schema. Always “http://elasticbox.net/schemas/costcenter” | Yes |
members | array | Members' id list of the Cost Center as Administrators. | No |
Members list parameters
An item in the list members
requires 3 parameters:
Parameter | Type | Description | Req. |
---|---|---|---|
id | string | can then be a workspace ID or a ldap group DN. | Yes |
role | string | always is administrator. | No |
type | string | can be workspace (default) or ldap. | No |
{
"name": "Cost Center example",
"organization": "camdemo",
"schema": "http://elasticbox.net/schemas/costcenter",
"members":[{"id":"camdemo"}]
}
Response
Normal Response Codes
- 201 Created
Common Error Response Codes
- 400 Bad Request
- 401 Unauthorized
Headers
Content-Type: application/json
Content-Length: 489
Date: Thu, 27 Dec 2018 09:57:34 GMT
Elasticbox-Release: 4.0.0
Response Parameters
Parameter | Type | Description |
---|---|---|
clc_alias | string | Costcenter account alias in the organization. |
created | string | Creation date. Example “2015-07-02 10:23:47.748740” |
deleted | object | Identifies whether the Cost Center is deleted; null for existing objects. |
id | string | Cost Center unique identifier. |
members | array | Members' list of a Cost Center. See Member parameters |
name | string | Cost Center name |
organization | string | Organization which the Cost Center belongs to. |
schema | string | Schema URI. http://elasticbox.net/schemas/costcenter. |
updated | string | Date of the last update. Example “2018-10-30 16:03:14.409029” |
uri | string | Cost Center URI. |
Response Body
{
"created": "2018-12-27 10:53:26.389183",
"deleted": null,
"id": "1072ca63-d84d-42f2-87a5-f09c72338eb1",
"members": [
{
"type": "workspace",
"role": "administrator",
"id": "camdemo"
},
],
"name": "Cost Center example",
"organization": "camdemo",
"schema": "http://elasticbox.net/schemas/costcenter",
"updated": "2018-12-27 10:53:26.389183",
"uri": "/services/costcenters/1072ca63-d84d-42f2-87a5-f09c72338eb1"
}
GET /services/costcenters
Fetches an existing Cost Center.
URL
Structure
[GET] /services/costcenters/{costcenter_id}
Example
[GET] https://cam.ctl.io/services/costcenters/1072ca63-d84d-42f2-87a5-f09c72338eb1
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Name | Type | Description | Req. |
---|---|---|---|
costcenter_id | string | Cost Center ID | Yes |
Request body parameters
- None
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Bad Request
- 401 Unauthorized
- 404 Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
clc_alias | string | Costcenter account alias in the organization. |
created | string | Creation date. Example “2015-07-02 10:23:47.748740” |
deleted | object | Identifies whether the Cost Center is deleted. |
id | string | Cost Center unique identifier. |
members | array | Members' list of a Cost Center. See Member parameters |
name | string | Cost Center name |
organization | string | Organization which the Cost Center belongs to. |
schema | string | Schema URI. http://elasticbox.net/schemas/costcenter. |
updated | string | Date of the last update. Example “2018-10-30 16:03:14.409029” |
uri | string | Cost Center URI. |
Response Body
{
"updated": "2018-10-30 16:03:14.409029",
"name": "Cost Center example",
"created": "2015-07-02 10:23:47.748740",
"deleted": null,
"uri": "/services/costcenters/1072ca63-d84d-42f2-87a5-f09c72338eb1",
"members": [
{
"type": "workspace",
"role": "administrator",
"id": "camdemo"
},
],
"clc_alias": "A73B",
"organization": "camdemo",
"id": "1072ca63-d84d-42f2-87a5-f09c72338eb1",
"schema": "http://elasticbox.net/schemas/costcenter"
}
PUT /services/costcenters
Updates one or several values on an existing Cost Center.
Note:
Be careful using this command because you can add or remove some values depending on whether they are included or not as a request parameter. We recommend first obtain this data with GET command and then make changes over them.
Pay attention to values like members which will be added or deleted if they exists or not in the request parameter.
URL
Structure
[PUT] /services/costcenters/{costcenter_id}
Example
[PUT] https://cam.ctl.io/services/costcenters/1072ca63-d84d-42f2-87a5-f09c72338eb1
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Name | Type | Description | Req. |
---|---|---|---|
costcenter_id | string | Cost Center ID | Yes |
Request body parameters
Name | Type | Description | Req. |
---|---|---|---|
id | string | Cost Center unique identifier. | Yes |
members | array | Members' list of the Cost Center. See Member parameters | Yes |
name | string | Cost Center name. | Yes |
organization | string | Organization which the Cost Center belongs to. | Yes |
schema | string | Schema URI. http://elasticbox.net/schemas/costcenter. | Yes |
icon_metadata | string | Icon used for the Cost Center account.. | No |
Note:
Be careful using this command because some values like members will be added or deleted if they exists or not in the request parameter. To not be deleted an existing member, just give its member id.
{
"id":"1072ca63-d84d-42f2-87a5-f09c72338eb1",
"name":"Cost Center example",
"organization":"camdemo",
"schema":"http://elasticbox.net/schemas/costcenter",
"members":[{"id":"camdemo"}]
}
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Bad Request
- 401 Unauthorized
- 404 Not Found
Headers
Content-Type: application/json
Content-Length: 489
Date: Thu, 27 Dec 2018 09:57:34 GMT
Elasticbox-Release: 4.0.0
Response Parameters
- None
Response Body
- See response in GET command.
DELETE /services/costcenters
Deletes an existing Cost Center of the authenticated user.
URL
Structure
[DELETE] /services/costcenters/{costcenter_id}
Example
[DELETE] https://cam.ctl.io/services/costcenters/1072ca63-d84d-42f2-87a5-f09c72338eb1
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Name | Type | Description | Req. |
---|---|---|---|
costcenter_id | string | Cost Center ID | Yes |
Request body parameters
- None
Response
Normal Response Codes
- 204 OK - No Content
Common Error Response Codes
- 401 Unauthorized
- 404 Not Found
Response Parameters
- None
Response Body
- None
Organizations API
Manage an Organization
Resource | Description |
---|---|
GET /services/organizations/{organization_name} | Gets the organization document |
GET /services/organizations/{organization_name}/boxes | Get the boxes of the given organization. |
GET /services/organizations/{organization_name}/instances | Get the instances of the given organization. |
GET /services/organizations/{organization_name}/providers | Get the providers of the given organization. |
GET /services/organizations/{organization_name}/workspaces | Get the workspaces 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.
URL
Structure
[GET] /services/organizations/{organization_name}
Example
GET https://cam.ctl.io/services/organizations/customer_org
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
organization_name | string | the name of the organization | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 401: Unauthorized - Invalid access token/cookie
- 403: Forbidden - User doesn’t belong to the organization
- 404: Not Found - No organization found with the given name
Response Parameters
Parameter | Type | Description |
---|---|---|
schema | string | Organization schema URI: //elasticbox.net/schemas/organization |
name | string | Organization name |
icon | string | Organization icon URI |
updated | string | Date of the last update |
created | string | Creation date |
setup | 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 | string | Domains that are a part of the organization |
authentication | object | List of the authentication methods to allow single sign-on in the organization. Contains the following properties:
|
ldap_last_sync_completed | string | 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: |
providers | array | List of cloud providers the organization can enable to register and deploy. Each provider type has the following properties enabled: |
tags | array | List of tags applied on instances deployed to cloud providers from the organization. Each tag has three properties: |
webhooks | array | List of webhooks that integrate with the organization. |
Response Body
{
"remedy_account_id": "CPY000000115554",
"features": {
"net_x": true,
"alm": true,
"monitoring": true,
"managed_provider": true,
"show_unregistered_resources": true,
"sync_corporate_groups": false,
"aws_reseller": true,
"ignore_velocity_templates": true,
"safehaven_dr": false,
"reporting": false,
"ucpe": false,
"managed_clc_provider": true,
"delegate_managed_os": true,
"custom_pricing": false,
"analytics": true,
"provider_sharing": true,
"validate_emails": true,
"safehaven_migration": false,
"azure_reseller": true,
"onboard_checklist": false,
"aware_duplicate_arns": false
},
"providers": [
{
"enabled": true,
"type": "CenturyLink",
"description": "Manage cloud hosting, Linux and Windows machines",
"pricing": []
},
{
"enabled": true,
"type": "CenturyLink DCC Foundation",
"description": "Manage cloud hosting, Linux and Windows machines.",
"pricing": []
},
{
"enabled": true,
"type": "CenturyLink DCC",
"pricing": [],
"description": "Manage cloud hosting, Linux and Windows machines"
},
{
"enabled": true,
"type": "Microsoft Azure",
"pricing": [],
"description": "Manage Microsoft services using Azure Resource Manager"
},
{
"enabled": true,
"type": "Amazon Web Services",
"description": "Manage EC2, S3, Dynamo DB, and RDS instances",
"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": "Azure Classic",
"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": "Rackspace",
"description": "Manage cloud hosting and Linux machines.",
"pricing": []
},
{
"enabled": true,
"type": "VMware vCloud Director",
"description": "Manage cloud hosting, Linux and Windows machines.",
"pricing": []
},
{
"enabled": true,
"type": "Dimension Data",
"description": "Manage cloud hosting, Linux and Windows machines",
"pricing": []
}
],
"account_installed_product": "******",
"clc_alias": "*****",
"plugins": [],
"account_status": "Active",
"vantive_id": "*******",
"display_name": "MissionField LLC",
"billing_account_number": "*******",
"theme": {
"logo": "/services/blobs/download/58888fc42364025f58d42b9a/mission-field.png",
"accent": null,
"css": "/services/blobs/download/58888fd3c571007a8af06207/mission-field.css"
},
"authentication": {
"password": true,
"google": true,
"saml": false,
"saml_config": {},
"github": true,
"ldap": true,
"clc": false,
"ldap_config": {
"ldap_group_sync": true,
"sources": [
{
"host": "ldap://ldap.***********.com",
"ldap_search_password": "************"
}
]
}
},
"itsm": {
"servicenow": {
"enabled": false
}
},
"default_costcenter": "c3195962-4c70-4ad6-a17a-189a5579a45a",
"ldap_groups": [],
"schema": "http://elasticbox.net/schemas/organization",
"updated": "2018-10-25 15:48:03.290547",
"account_type": "Billable",
"tags": [
{
"type": "Box",
"name": "box",
"value": null
},
{
"type": "Email",
"name": "email",
"value": null
}
],
"deleted": null,
"ldap_last_sync_completed": null,
"domains": [
"**************"
],
"members": [
{
"role": "administrator",
"type": "workspace",
"id": "********"
},
{
"type": "workspace",
"role": "administrator",
"id": "**************"
},
{
"role": "administrator",
"type": "ldap",
"id": "CN=Cloud Application Manager Support,OU=Internal Server Security Groups,OU=******,OU=******,OU=ManagedHosting,DC=na,DC=msmps,DC=net"
}
],
"icon": "/services/blobs/download/58888fc42364025f58d42b9a/mission-field.png",
"federated_to": [
"centurylink",
"ctlops"
],
"name": "mission-field",
"created": "2017-01-25 11:11:13.254512",
"setup": true,
"release": "4.0"
}
GET /services/organizations/{organization_name}/boxes
Get the boxes in the given organization.
URL
Structure
[GET] /services/organizations/{organization_name}/boxes
Example
GET https://cam.ctl.io/services/organizations/centurylink/boxes
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Name | Type | Description | Req. |
---|---|---|---|
organization_name | String | The name of the organization | Yes |
Response
Normal Code
- 200 OK
Error Codes
- 401: Unauthorized - Invalid access token/cookie
- 403: Forbidden - User doesn’t belong to the organization
- 404 - Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
schema | string | Box schema URI: //elasticbox.net/schemas/boxes |
name | string | Organization's Box name |
id | string | Organization's Box identification number. |
auto_update | boolean | Auto update the box if any related requirement get updated. |
updated | string | Date of the last update. |
created | string | Creation date. |
deleted | string | Deletion date. |
profile | array | It shows the profile information of the box. |
members | array | List of users who can access this box. |
organization | string | It shows the name of the organization. |
provider_id | string | It says to what provider is belonged this box. |
uri | string | A url to the API service that makes a possibility to fetch the data of this box directly by a GET request. |
readme | array | List of the information about the documentation for this API service. |
owner | string | It shows the owner of this box. |
visibility | strings | It indicates the visibility of the box for public or workspace or only organization. |
variables | array | A list of the variables that defined in the box |
claims | array | A list of the claims that defined in the box |
Response Body
{
"profile": {
"datacenter": "va1",
"group": [
"Default Group"
],
"network": "vlan_3135_10.128.235",
"server_type": "Standard",
"pricing_info": {
"estimated_monthly": 2592000000,
"provider_type": "CenturyLink",
"hourly_price": 3600000,
"factor": 100000000
},
"disks": [],
"cpus": 1,
"public_ip": false,
"instances": 1,
"template": "CENTOS-7-64-TEMPLATE",
"memory": 2,
"managed_os": false,
"schema": "http://elasticbox.net/schemas/centurylink/compute/profile"
},
"provider_id": "338f38dc-e667-47e0-9026-b253138f109e",
"automatic_updates": "off",
"name": "default-small-va1",
"created": "2018-08-21 20:26:17.273033",
"deleted": null,
"variables": [],
"updated": "2018-08-21 20:26:17.273033",
"visibility": "workspace",
"uri": "/services/boxes/55c6aad7-393c-439e-94a0-88108ae1ee76",
"readme": {
"url": "#cam-platform-services/resources/default-box-overview",
"upload_date": "2018-08-21 20:26:17.272359",
"length": 1307,
"content_type": "text/x-markdown"
},
"members": [],
"claims": [
"small",
"linux"
],
"owner": "cam3",
"organization": "mission-field",
"id": "55c6aad7-393c-439e-94a0-88108ae1ee76",
"schema": "http://elasticbox.net/schemas/boxes/policy"
}
GET /services/organizations/{organization_name}/instances
Get the schema of instances in the given organization.
URL
Structure
[GET] /services/organizations/{organization_name}/instances
Example
GET https://cam.ctl.io/services/organizations/customer_org/instances
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Name | Type | Description | Req. |
---|---|---|---|
organization_name | String | The name of the organization | Yes |
Response
Normal Code
- 200 OK
Error Codes
- 401: Unauthorized - Invalid access token/cookie
- 403: Forbidden - User doesn’t belong to the organization
- 404: Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
schema | string | Organization schema URI: //elasticbox.net/schemas/instance |
name | string | Instance name |
id | string | Instance Identifier |
updated | string | Date of the last update |
created | string | Creation date |
auto_update | boolean | Auto update the box if any related requirement get updated. |
box | string | The identifier of the last deployed box. |
boxes | array | A list of the boxes that defined in the lifecycle of the instance |
bindings | array | List of specified bindings of the instance |
uri | string | A url to the API service that makes a possibility to fetch the data of this box directly by a GET request. |
owner | string | It shows the owner of this box. |
state | string | The last state of the instance |
members | array | List of users who can access this box. |
service | object | An object that contains information about the instance's service |
policy_box | object | An object that includes the policy of the box that is defined for the instance. |
Response Body
{
"box": "c2be22d3-22bf-4694-8a6d-e2efe3dceebd",
"bindings": [],
"updated": "2018-08-22 13:32:51.728997",
"automatic_updates": "off",
"policy_box": {
"profile": {
"datacenter": "va1",
"group": [
"Default Group"
],
"network": "vlan_3135_10.128.235",
"server_type": "Standard",
"pricing_info": {
"estimated_monthly": 5388004080,
"factor": 100000000,
"hourly_price": 7483339,
"provider_type": "CenturyLink"
},
"disks": [],
"cpus": 2,
"public_ip": false,
"instances": 1,
"template": "CENTOS-7-64-TEMPLATE",
"memory": 4,
"managed_os": false,
"schema": "http://elasticbox.net/schemas/centurylink/compute/profile"
},
"provider_id": "338f38dc-e667-47e0-9026-b253138f109e",
"automatic_updates": "off",
"name": "management-appliance-va1",
"deleted": null,
"variables": [],
"visibility": "workspace",
"owner": "cam3",
"members": [],
"organization": "mission-field",
"readme": {
"url": "#cam-platform-services/resources/default-box-overview",
"upload_date": "2018-08-22 13:16:15.650210",
"length": 1307,
"content_type": "text/x-markdown"
},
"claims": [
"centos7",
"linux"
],
"id": "01bf237e-2e73-416c-a72b-d94ea10d1c2e",
"schema": "http://elasticbox.net/schemas/boxes/policy"
},
"name": "managed-provider-appliance-va1",
"service": {
"type": "Linux Compute",
"id": "eb-6okdo",
"machines": [
{
"state": "done",
"name": "managed-provider-appliance-va1-6okdo-1",
"workflow": []
}
]
},
"tags": [
"managed",
"appliance"
],
"variables": [
{
"scope": "gateway.constants",
"type": "Text",
"value": "https://gateway.managedos.ctl.io",
"visibility": "internal",
"name": "managed_os_api_url"
},
{
"scope": "gateway.constants",
"type": "Text",
"visibility": "internal",
"value": "https://api.watcher.ctl.io/",
"name": "watcher_reg_url"
}
],
"created": "2018-08-22 13:16:15.687975",
"boxes": [
{
"schema": "http://elasticbox.net/schemas/boxes/script",
"updated": "2018-08-07 23:20:02.898885",
"automatic_updates": "off",
"requirements": [
"centos7",
"linux"
],
"description": "CenturyLink Management Appliance",
"created": "2018-08-08 16:43:02.151411",
"icon_metadata": {
"image": "/services/blobs/download/58a21fb465eca605038edc67/centurylink-logo.svg",
"border": "#8CC63F",
"fill": "#ffffff"
},
"variables": [
{
"name": "WaitForCMDBRecon",
"required": true,
"visibility": "internal",
"value": "true",
"type": "Options",
"options": "true,false"
},
{
"required": true,
"type": "Text",
"name": "CMDB_MaxTries",
"value": "120",
"visibility": "internal"
}
],
"visibility": "workspace",
"name": "CenturyLink Management Appliance",
"deleted": null,
"version": {
"box": "c2be22d3-22bf-4694-8a6d-e2efe3dceebd",
"number": {
"major": 0,
"minor": 5,
"patch": 5
},
"workspace": "keithhomco",
"description": "Limited support for no outbound connectivity scenarios (contact cam-msa@centurylink.com for details)"
},
"id": "fe257f92-2808-4c1a-aa1d-310a87e228b9",
"categories": [
"managed"
],
"members": [
{
"role": "read",
"workspace": "mgd"
},
{
"role": "read",
"workspace": "managed6"
}
],
"owner": "managed1",
"organization": "centurylink",
"readme": {
"url": "#cam-platform-services/blobs/download/593843b76d4c585793fe1fb9/readme",
"upload_date": "2017-06-07 18:19:35.185072",
"length": 2962,
"content_type": "text/x-markdown"
},
"events": {
"pre_install": {
"url": "/services/blobs/download/5b6a26565fc39f10a99fefaa/pre_install",
"length": 2170,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"draft_from": "7f1bd23f-14cf-4e44-a831-53716e0f20a8",
"icon": "/icons/boxes/c2be22d3-22bf-4694-8a6d-e2efe3dceebd"
}
],
"uri": "/services/instances/i-k2tj0y",
"is_deploy_only": true,
"state": "done",
"members": [],
"owner": "cam3",
"operation": {
"event": "deploy",
"workspace": "cam3",
"created": "2018-08-22 13:16:15.857029"
},
"id": "i-k2tj0y",
"schema": "http://elasticbox.net/schemas/instance"
}
GET /services/organizations/{organization_name}/providers
Get the schema of providers in the given organization.
URL
Structure
[GET] /services/organizations/{organization_name}/providers
Example
GET https://cam.ctl.io/services/organizations/centurylink/providers
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Name | Type | Description | Req. |
---|---|---|---|
organization_name | String | The name of the organization | Yes |
Response
Normal Code
- 200 OK
Error Codes
- 401: Unauthorized - Invalid access token/cookie
- 403: Forbidden - User doesn’t belong to the organization
- 404: Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
schema | string | Provider schema URI: //elasticbox.net/schemas/providers |
name | string | It defines the provider name |
icon | string | Provider icon URI |
updated | string | Date of the last update |
created | string | Creation date |
description | string | Short description about the provider |
uri | string | A url to the API service that makes a possibility to fetch the data of this box directly by a GET request. |
state | string | It shows the last state of the provider |
members | array | List of users who can access this box. |
type | string | Indicates the type of the provider. |
id | string | Contains the id of provider |
providers | array | List of cloud providers the organization can enable to register and deploy. Each provider type has the following properties enabled: |
owner | string | It shows the owner of this box. |
service | object | An object that contains information about the instance's service |
Response Body
{
"updated": "2018-09-28 21:18:17.691311",
"description": "UMW Lab Account for CAM MSA Testing",
"icon": "images/platform/centurylink.svg",
"created": "2018-08-21 20:03:15.901180",
"deleted": null,
"uri": "/services/providers/338f38dc-e667-47e0-9026-b253138f109e",
"name": "UMWC",
"services": [
{
"name": "Linux Compute"
},
{
"name": "Windows Compute"
}
],
"state": "ready",
"members": [],
"owner": "cam3",
"type": "CenturyLink",
"id": "338f38dc-e667-47e0-9026-b253138f109e",
"schema": "http://elasticbox.net/schemas/centurylink/provider"
}
GET /services/organizations/{organization_name}/workspaces
Get the schema of workspaces in the given organization.
URL
Structure
[GET] /services/organizations/{organization_name}/workspaces
Example
GET https://cam.ctl.io/services/organizations/centurylink/workspaces
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Name | Type | Description | Req. |
---|---|---|---|
organization_name | String | The name of the organization | Yes |
Response
Normal Code
- 200 OK
Error Codes
- 401: Unauthorized - Invalid access token/cookie
- 403: Forbidden - User doesn’t belong to the organization
- 404: Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
last_name | string | The last name of the user. |
favorites | array | List of the users or organizations that has been selected as favorite. |
clc_alias | string | Indicates the CenturyLink billing alias if it exists for the workspace. |
id | string | The user name in this workspace. |
last_login | string | The date of the last login. |
add_provider | boolean | |
deploy_instance | boolean | |
type | string | The type of the user. |
string | The email of the user. | |
schema | string | Provider schema URI: //elasticbox.net/schemas/providers |
updated | string | Date of the last update |
take_tour | boolean | Indicates if had the first login tour or not. |
deleted | string | The Deletion date of the user. |
costcenter | string | The given name of the cost center when the user got created. |
icon | string | The user icon URI |
group_dns | array | The list of the users that have been configured by AD in a local network. |
email_validated_at | string | The date that user got validated. |
validate_email_id | string | The validation id that generated for the user. |
reset_password_id | string | The reset id that generated for the user. |
name | string | The given name of the user. |
created | string | The creation date of the user |
uri | string | A url to the API service that makes a possibility to fetch the data of this box directly by a GET request. |
members | array | If the user type be a "team" then it shows the workspaces that this user is belonged to |
organization | string | The name of the organization that user belongs to it. |
Response Body
{
"last_name": "1",
"favorites": [
{
"type": "team_workspace",
"id": "insightglobal4"
}
],
"clc_alias": "DMFC",
"id": "missionfields1",
"last_login": "2018-07-25 14:18:22.323786",
"add_provider": true,
"deploy_instance": true,
"type": "personal",
"email": "*****@*************.com",
"schema": "http://elasticbox.net/schemas/workspaces/personal",
"updated": "2018-07-25 14:24:05.510205",
"take_tour": true,
"deleted": null,
"clc_username": null,
"costcenter": "c3195962-4c70-4ad6-a17a-189a5579a45a",
"icon": null,
"group_dns": [],
"email_validated_at": "2017-02-01 15:03:54.087863",
"name": "MF User",
"created": "2017-02-01 15:03:54.087863",
"support_user_created": true,
"uri": "/services/workspaces/missionfields1",
"organization": "mission-field"
}
PUT /services/organizations/{organization_name}
Updates an existing organization given its name. Only the organization administrator can update.
URL
Structure
[PUT] /services/organizations/{organization_name}
Example
PUT https://cam.ctl.io/services/organizations/{organization_name}
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Name | Type | Description | Req. |
---|---|---|---|
organization_name | String | The name of the organization | Yes |
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"
],
"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"
}
]
},
{
"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":[
]
}
],
"tags":[
{
"name":"workspace",
"type":"Workspace",
"value":null
},
{
"name":"box",
"type":"Box",
"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":[
]
}
Request Parameters
Parameter | Type | Description |
---|---|---|
schema | string | Organization schema URI: //elasticbox.net/schemas/organization |
name | string | Organization name |
icon | string | Organization icon URI |
updated | string | Date of the last update |
created | string | Creation date |
setup | 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 | string | Domains that are a part of the organization |
authentication | object | List of the authentication methods to allow single sign-on in the organization. Contains the following properties:
|
ldap_last_sync_completed | string | 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: |
providers | array | List of cloud providers the organization can enable to register and deploy. Each provider type has the following properties: |
tags | array | List of tags applied on instances deployed to cloud providers from the organization. Each tag has three properties: |
webhooks | array | List of webhooks that integrate with the organization. |
cost_centers | array | List of cost centers. Each cost center contains the following properties:
|
Response
Normal Code
- 200 OK
Error Codes
- 400: Bad Request - Request missing, incomplete or includes invalid properties (details provided inside body)
- 401: Unauthorized - Invalid access token/cookie
- 403: Forbidden - User doesn’t belong to the organization
- 404: Not Found
- 409: Conflict - 'updated' property mismatch. (Make a GET call to API to fetch the current 'updated' property and use it in a new PUT request)
Response Parameters
Parameter | Type | Description |
---|---|---|
schema | string | Organization schema URI: http://elasticbox.net/schemas/organization |
name | string | Organization name |
icon | string | Organization icon URI |
updated | string | Date of the last update |
created | string | Creation date |
setup | 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 | string | Domains that are a part of the organization |
authentication | object | List of the authentication methods to allow single sign-on in the organization. Contains the following properties:
|
ldap_last_sync_completed | string | 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: |
providers | array | List of cloud providers the organization can enable to register and deploy. Each provider type has the following properties enabled: |
tags | array | List of tags applied on instances deployed to cloud providers from the organization. Each tag has three properties: |
webhooks | array | List of webhooks that integrate with the organization. |
cost_centers | array | List of cost centers. Each cost center contains the following properties:
|
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"
],
"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"
}
]
},
{
"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
}
],
"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.
URL
Structure
[PUT] /organizations/{organization_name}/sync_groups
Example
PUT https://cam.ctl.io/organizations/{organization_name}/sync_groups
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Name | Type | Description | Req. |
---|---|---|---|
organization_name | String | The name of the organization | Yes |
Response
Normal Code
- 202 Accepted
Error Codes
- 401: Unauthorized - Invalid access token/cookie
- 404: Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
schema | string | Organization schema URI: //elasticbox.net/schemas/organization |
name | string | Organization name |
icon | string | Organization icon URI |
updated | string | Date of the last update |
created | string | Creation date |
setup | 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 | string | Domains that are a part of the organization |
authentication | object | List of the authentication methods to allow single sign-on in the organization. Contains the following properties:
|
ldap_last_sync_completed | string | 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: |
providers | array | List of cloud providers the organization can enable to register and deploy. Each provider type has the following properties enabled: |
tags | array | List of tags applied on instances deployed to cloud providers from the organization. Each tag has three properties: |
webhooks | array | List of webhooks that integrate with the organization. |
cost_centers | array | List of cost centers. Each cost center contains the following properties:
|
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": "CenturyLink",
"description": "Manage cloud hosting, Linux and Windows machines",
"pricing": []
},
{
"enabled": true,
"type": "CenturyLink DCC Foundation",
"description": "Manage cloud hosting, Linux and Windows machines.",
"pricing": []
},
{
"enabled": true,
"type": "CenturyLink DCC",
"pricing": [],
"description": "Manage cloud hosting, Linux and Windows machines"
},
{
"enabled": true,
"type": "Microsoft Azure",
"pricing": [],
"description": "Manage Microsoft services using Azure Resource Manager"
},
{
"enabled": true,
"type": "Amazon Web Services",
"description": "Manage EC2, S3, Dynamo DB, and RDS instances",
"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": "Azure Classic",
"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": "Rackspace",
"description": "Manage cloud hosting and Linux machines.",
"pricing": []
},
{
"enabled": true,
"type": "VMware vCloud Director",
"description": "Manage cloud hosting, Linux and Windows machines.",
"pricing": []
},
{
"enabled": true,
"type": "Dimension Data",
"description": "Manage cloud hosting, Linux and Windows machines",
"pricing": []
}
],
"ldap_last_sync_completed":null,
"tags":[
{
"name":"box",
"type":"Box name",
"value":null
},
{
"name":"environment",
"type":"Environment",
"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":[
]
}
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
Resource | 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 the default workspace if no parameter is provided and user has no other privilege. If ids parameter (a list of workspace ids) is provided then it fetches all the workspaces corresponding to that list and user has access to.
URL
Structure
[GET] /services/workspaces
Example
[GET] https://cam.ctl.io/services/workspaces
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
NAME | TYPE | DESCRIPTION | REQ. |
---|---|---|---|
ids | string | Fetches the workspaces corresponding to each workspace id in the string. The ids will be separated by commas. For example: workspace4,operations,workspace5. | No |
limit | integer | It limits the number of workspaces listed in the reply. | No |
Request body parameters
- None
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Bad Request
- 401 Unauthorized
- 404 Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
add_provider | boolean | Indicates true if a personal workspace has a provider |
billing_notice | boolean | If the flag is False we don't show the billing notice to the user |
clc_alias | string | (optional) Account Id for billing customers that have an account at CL |
clc_username | string | If user has CLC authentication |
created | string | Creation date |
costcenter | string | Cost center id |
dashboard_notice | boolean | If the flag is False we don't show the dashboard notice to the user |
deleted | string | It will be null if the resource is valid or a string with the time and date of deletion if it was deleted. End users will always see this parameter as null |
deploy_instance | boolean | Indicates if the workspace has deployed an instance |
string | User email | |
email_validated_at | string | Email validation date. |
favorites | array | List of user's favourite workspaces. User set a workspace as favourite when he clicks on a star. |
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 |
icon | string | Relative URL to a file that is stored as a blob in CAM and represents the workspace icon |
id | string | Workspace unique identifier |
last_login | string | Date of the last login. Example “2015-07-02 10:23:47.748740” |
last_name | string | User last name |
ldap_groups | array | List of fully qualified names of LDAP groups that are members of a workspace. Present in Team Workspaces |
members | array | Lists members of a team workspace |
name | string | User (Workspace) name |
organization | string | (Personal Workspaces) Organization of the workspace |
organizations | array | (Team Workspaces) List of the organizations' name of the workspace |
owner | string | Refers to the username that owns the workspace. Present in Team Workspaces |
saml_id | string | (optional) Account id if user logged in with SAML |
schema | string | Schema URI. For personal workspace: “http://elasticbox.net/schemas/workspaces/personal” For team workspace: “http://elasticbox.net/schemas/workspaces/team” |
support_user_created | boolean | True if support CAM user for this workspace has been created and is ready |
take_tour | boolean | If true, the user has dismissed the tour popup |
type | string | Workspace type. Can be personal or team. Users can edit personal workspace as long as schemas are valid and the user has privileges. |
updated | string | Date of the last update |
uri | string | Workspace uri |
Response Body
- Response to request without parameters
[
{
"last_name": "ElasticBox",
"costcenter": "3ef6e6e0-a08d-40f1-98bf-4a7fc9b9c63a",
"clc_alias": "CTLX",
"id": "operations",
"billing_notice": true,
"last_login": "2018-12-11 12:53:11.636462",
"add_provider": true,
"deploy_instance": true,
"type": "personal",
"email": "operations@elasticbox.com",
"schema": "http://elasticbox.net/schemas/workspaces/personal",
"updated": "2018-12-11 12:53:11.636781",
"take_tour": true,
"deleted": null,
"dashboard_notice": true,
"email_validated_at": "2018-10-11 12:10:03.468280",
"favorites": [],
"icon": null,
"group_dns": [],
"clc_username": null,
"name": "Operations",
"created": "2018-10-11 12:10:03.468280",
"support_user_created": false,
"uri": "/services/workspaces/operations",
"organization": "elasticbox"
}
]
- Response to request with parameter
[
{
"uri": "/services/workspaces/operations",
"icon": null,
"id": "operations",
"name": "Operations",
"schema": "http://elasticbox.net/schemas/workspaces/personal"
},
{
"uri": "/services/workspaces/workspace4",
"icon": "/services/blobs/download/5bcf2c5c1862a312d7ac3c37/Screen-Shot-2018-10-23-at-16.12.23.png",
"id": "workspace4",
"name": "WORKSPACE A",
"schema": "http://elasticbox.net/schemas/workspaces/team"
},
{
"uri": "/services/workspaces/workspace5",
"icon": "/services/blobs/download/5bcf2c5c1862a312d7ac3c37/Screen-Shot-2018-10-23-at-16.12.23.png",
"id": "workspace5",
"name": "WORKSPACE B",
"schema": "http://elasticbox.net/schemas/workspaces/team"
}
]
POST /services/workspaces
Creates a workspace and gets the created workspace.
URL
Structure
[POST] /services/workspaces
Example
[POST] https://cam.ctl.io/services/workspaces
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
- None
Request body parameters
NAME | TYPE | DESCRIPTION | REQ. |
---|---|---|---|
costcenter | string | Cost center id | Yes |
name | string | Workspace name | Yes |
schema | string | Schema Url. For example, http://elasticbox.net/schemas/workspaces/team | Yes |
Response
Normal Response Codes
- 201 Created
Common Error Response Codes
- 400 Invalid Data
- 401 Unauthorized
Response Parameters
Parameter | Type | Description |
---|---|---|
costcenter | string | Cost center id |
created | string | Creation date |
deleted | string | It will be null if the resource is valid or a string with the time and date of deletion if it was deleted. End users will always see this parameter as null |
id | string | Workspace id |
members | array | Lists members of a team workspace. |
name | string | Workspace name |
organizations | array | List of organization names |
schema | string | Schema URI. Either “http://elasticbox.net/schemas/workspaces/personal” or “http://elasticbox.net/schemas/workspaces/team” |
type | string | Workspace type. Can be personal or team. Users can edit personal workspace as long as schemas are valid and the user has privileges. |
updated | string | Update date |
uri | string | Url to access the workspace |
Response Body
{
"organizations": [
"elasticbox"
],
"updated": "2018-10-24 14:52:42.302338",
"name": "WORKSPACE C",
"created": "2018-10-24 14:52:42.302338",
"deleted": null,
"uri": "/services/workspaces/workspace6",
"members": [],
"costcenter": "3ef6e6e0-a08d-40f1-98bf-4a7fc9b9c63a",
"type": "team",
"id": "workspace6",
"schema": "http://elasticbox.net/schemas/workspaces/team"
}
GET /services/workspaces/{workspace_id}
Fetches an existing workspace for the specified workspace ID.
URL
Structure
[GET] /services/workspaces/{workspace_id}
Example
[GET] https://cam.ctl.io//services/workspaces/workspace4
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
NAME | TYPE | DESCRIPTION | REQ. |
---|---|---|---|
workspace_id | string | Workspace id. | Yes |
Request body parameters
- None
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 401 Unauthorized
- 404 Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
costcenter | string | Cost center id |
created | string | Creation date |
deleted | string | It will be null if the resource is valid or a string with the time and date of deletion if it was deleted. End users will always see this parameter as null |
icon | string | Url to Workspace avatar |
id | string | Workspace id |
members | array | Lists members of a team workspace |
name | string | Workspace name |
organizations | array | List of organization names |
schema | string | Schema URI. Either “http://elasticbox.net/schemas/workspaces/personal” or “http://elasticbox.net/schemas/workspaces/team” |
type | string | Workspace type. Can be personal or team. Users can edit personal workspace as long as schemas are valid and the user has privileges. |
updated | string | Update date |
uri | string | Url to access the workspace |
Response Body
{
"organizations": [
"elasticbox"
],
"updated": "2018-10-23 14:13:21.375854",
"name": "WORKSPACE C",
"created": "2018-10-23 14:13:21.375854",
"deleted": null,
"uri": "/services/workspaces/workspace4",
"schema": "http://elasticbox.net/schemas/workspaces/team",
"costcenter": "3ef6e6e0-a08d-40f1-98bf-4a7fc9b9c63a",
"members": [],
"type": "team",
"id": "workspace4",
"icon": "/services/blobs/download/5bcf2c5c1862a312d7ac3c37/Screen-Shot-2018-10-23-at-16.12.23.png"
}
PUT /services/workspaces/{workspace_id}
Updates an existing workspace.
URL
Structure
[PUT] /services/workspaces/{workspace_id}
Example
[PUT] https://cam.ctl.io/services/workspaces/workspace4
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
NAME | TYPE | DESCRIPTION | REQ. |
---|---|---|---|
workspace_id | string | Workspace id. | Yes |
Request body parameters
NAME | TYPE | DESCRIPTION | REQ. |
---|---|---|---|
costcenter | string | Cost center id | Yes |
created | string | Workspace creation date | No |
deleted | string | It will be null if the resource is valid or a string with the time and date of deletion if it was deleted. End users will always see this parameter as null | No |
icon | string | Icon url | No |
id | string | Workspace id | Yes |
members | array | List of objects representing the members (other workspaces) added to this workspace | No |
name | string | New workspace name | Yes |
organizations | array | List of organization names | Yes |
schema | string | Workspace schema uri. Schema URI. Either “http://elasticbox.net/schemas/workspaces/personal” or “http://elasticbox.net/schemas/workspaces/team” | Yes |
type | string | Workspace type. Can be personal or team. Users can edit personal workspace as long as schemas are valid and the user has privileges. | No |
updated | string | Workspace update date | No |
{
"organizations":["elasticbox"],
"updated": "2018-10-25 07:26:50.016849",
"name": "WORKSPACE E",
"icon": "/services/blobs/download/5bcf2c5c1862a312d7ac3c37/Screen-Shot-2018-10-23-at-16.12.23.png",
"created": "2018-10-23 14:15:29.294888",
"deleted": null,
"members":[
{
"id": "operations",
"type": "workspace",
"role": "user"
}
],
"costcenter": "3ef6e6e0-a08d-40f1-98bf-4a7fc9b9c63a",
"type": "team",
"id": "workspace5",
"schema": "http://elasticbox.net/schemas/workspaces/team"
}
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Bad Request
- 401 Unauthorized
- 404 Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
costcenter | string | Cost center id |
created | string | Workspace creation date |
deleted | string | It will be null if the resource is valid or a string with the time and date of deletion if it was deleted. End users will always see this parameter as null |
icon | string | Icon url |
id | string | Workspace id |
members | array | List of objects representing the members (other workspaces) added to this workspace |
name | string | New workspace name |
organizations | array | List of organization names |
schema | string | Workspace schema uri. Schema URI. Either “http://elasticbox.net/schemas/workspaces/personal” or “http://elasticbox.net/schemas/workspaces/team” |
type | string | Workspace type. Can be personal or team. Users can edit personal workspace as long as schemas are valid and the user has privileges. |
updated | string | Workspace update date |
uri | string | Url to access the updated workspace view |
Response Body
{
"organizations": [
"elasticbox"
],
"updated": "2018-10-26 12:16:11.763338",
"name": "WORKSPACE A",
"created": "2018-10-26 12:15:44.433381",
"deleted": null,
"uri": "/services/workspaces/workspace7",
"costcenter": "3ef6e6e0-a08d-40f1-98bf-4a7fc9b9c63a",
"members":
[
{
"type": "workspace",
"role": "user",
"id": "operations",
"workspace": "operations"
}
],
"icon": null,
"type": "team",
"id": "workspace7",
"schema": "http://elasticbox.net/schemas/workspaces/team"
}
DELETE /services/workspaces/{workspace_id}
Deletes a workspace.
URL
Structure
[DELETE] /services/workspaces/{workspace_id}
Example
[DELETE] https://cam.ctl.io/services/workspaces/workspace4
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
NAME | TYPE | DESCRIPTION | REQ. |
---|---|---|---|
workspace_id | string | Workspace id. | Yes |
Request body parameters
- None
Response
Normal Response Codes
- 204 No Content
Common Error Response Codes
- 401 Unauthorized
- 404 Not Found
Response Parameters
- None
Response Body
- None
GET /services/workspaces/{workspace_id}/providers
Gets the providers registered in a workspace.
URL
Structure
[GET] /services/workspaces/{workspace_id}/providers
Example
[GET] https://cam.ctl.io/services/workspaces/workspace4/providers
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
NAME | TYPE | DESCRIPTION | REQ. |
---|---|---|---|
workspace_id | string | Workspace id | Yes |
Request body parameters
- None
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 401 Unauthorized
- 404 Not found
Response Parameters
Parameter | Type | Description |
---|---|---|
created | string | Provider creation date |
description | string | Provider description |
icon | string | Provider icon url |
id | string | Provider id |
members | array | List of members with access to the provider |
name | string | Provider name |
owner | string | Workspace id where the provider belongs to |
schema | string | Provider schema uri. For example, "http://elasticbox.net/schemas/aws/provider" See provider API documentation for a full list of schema types |
services | array | List of services associated to the provider |
state | string | Provider state |
type | string | Provider type |
updated | string | Provider update date |
uri | string | Url to access the provider view |
Response Body
[
{
"updated": "2018-11-20 12:23:10.654685",
"description": null,
"icon": "images/platform/aws.svg",
"created": "2018-11-19 12:20:44.788595",
"uri": "/services/providers/5b98633e-31d5-46ed-b530-f959d2898eef",
"name": "My Amazon Web Services Provider",
"services": [...],
"state": "ready",
"members": [],
"owner": "operations",
"credentials": {},
"type": "Amazon Web Services",
"id": "5b98633e-31d5-46ed-b530-f959d2898eef",
"schema": "http://elasticbox.net/schemas/aws/provider"
},
{
"updated": "2018-11-20 12:23:11.057875",
"name": "My Centurly Link Provider",
"icon": "images/platform/centurylink.svg",
"created": "2018-11-20 08:57:43.926910",
"uri": "/services/providers/ca33877a-6ade-4d28-8ed1-8c5e455148fa",
"services": [...],
"state": "ready",
"members": [],
"owner": "operations",
"type": "CenturyLink",
"id": "ca33877a-6ade-4d28-8ed1-8c5e455148fa",
"schema": "http://elasticbox.net/schemas/centurylink/provider"
}
]
GET /services/workspaces/{workspace_id}/boxes
Gets the all the boxes in a workspace.
URL
Structure
[GET] /services/workspaces/{workspace_id}/boxes
Example
[GET] https://cam.ctl.io/services/workspaces/workspace4/boxes
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
NAME | TYPE | DESCRIPTION | REQ. |
---|---|---|---|
workspace_id | string | Workspace id | Yes |
Request body parameters
- None
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 401 Unauthorized
- 404 Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
automatic_updates | string | Type of automatic update |
created | string | Box creation date |
deleted | string | It will be null if the resource is valid or a string with the time and date of deletion if it was deleted. End users will always see this parameter as null |
description | string | Box description |
event | object | Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path |
events | object | 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. |
icon | string | Box icon url |
id | string | Box id |
members | array | List of members with access to the box |
name | string | Box name |
organization | string | Organization name |
owner | string | Workspace owner id |
requirements | array | List of requirements of the box |
schema | string | Box schema uri |
type | string | Box type |
updated | string | Box update date |
uri | string | Url to access the box view |
variables | array | List of variables associated to the box |
visibility | string | Type of visibility the provider has |
Response Body
[
{
"updated": "2018-10-11 12:09:18.184974",
"automatic_updates": "off",
"requirements": [
"linux"
],
"name": "Oracle Database Service",
"icon": "images/platform/oracle.png",
"created": "2018-10-11 12:09:18.184974",
"deleted": null,
"variables": [
{
"required": false,
"type": "Port",
"name": "port",
"value": "1521",
"visibility": "public"
},
{
"required": false,
"type": "Text",
"name": "database_name",
"value": "",
"visibility": "public"
},
{
"required": true,
"type": "Text",
"name": "username",
"value": "",
"visibility": "public"
},
{
"required": true,
"type": "Password",
"name": "password",
"value": "",
"visibility": "public"
}
],
"description": "Oracle Database as a Service",
"uri": "/services/boxes/ce709ff9-69a7-4d95-bf14-97f069910be8",
"visibility": "public",
"id": "ce709ff9-69a7-4d95-bf14-97f069910be8",
"friendly_id": "oracle-database-service",
"members": [],
"owner": "elasticbox",
"organization": "public",
"events": {},
"schema": "http://elasticbox.net/schemas/boxes/script"
},
... MORE BOXES ...
{
"updated": "2018-10-26 09:39:10.156446",
"automatic_updates": "off",
"requirements": [],
"name": "Container A",
"created": "2018-10-26 09:39:10.156446",
"deleted": null,
"variables": [
{
"required": false,
"type": "Box",
"name": "DOCKER_BOX",
"value": "14c6d2c0-a1ea-436c-862b-c63d60acc53b",
"visibility": "public"
}
],
"uri": "/services/boxes/bcc27232-4c44-470c-a329-30e45931b523",
"visibility": "workspace",
"events": {},
"members": [],
"owner": "workspace5",
"organization": "elasticbox",
"id": "bcc27232-4c44-470c-a329-30e45931b523",
"schema": "http://elasticbox.net/schemas/boxes/docker"
}
]
GET /services/workspaces/{workspace_id}/instances
Gets the all the instances in a workspace.
URL
Structure
[GET] /services/workspaces/{workspace_id}/instances
Example
[GET] https://cam.ctl.io/services/workspaces/myworkspace/instances
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
NAME | TYPE | DESCRIPTION | REQ. |
---|---|---|---|
workspace_id | string | Workspace id | Yes |
Request body parameters
- None
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 401 Unauthorized
- 404 Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
automatic_updates | string | Type of automatic update |
bindings | array | List of instance bindings |
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 |
icon | string | Instance icon uri |
id | string | Instance id |
is_deploy_only | boolean | If the instance is deploy only |
machine | object | Machine contained in the service machines list |
machine.name | string | Machine name |
machine.state | string | Machine state, there are three possible states: processing, done and unavailable |
machine.workflow | array | List of workflow actions, each workflow action object contains three parameters: box, event and script |
members | array | List of members with access to the instance |
name | string | Instance name |
operation | object | Last operation, there are several types of operations: deploy, shutdown, poweron, reinstall, reconfigure, terminate, terminate_service |
policy_box | object | Instance policy box |
schema | string | Instance schema uri |
service | object | Instance service |
service.id | string | Service id |
service.machines | array | List of service machines |
service.type | string | Required. Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service |
state | string | Instance state, there are three possible states: processing, done and unavailable |
tags | array | List of Instance tags |
updated | string | Date of the last update |
uri | string | Instance uri |
variables | array | List of instance variables |
Response Body
[
{
"box": "29a9fe00-517a-4635-a77c-6eb473f4d7a1",
"lease": {
"released": false,
"operation": "terminate",
"expire": "2018-12-12 11:20:48.751000"
},
"updated": "2018-12-12 10:30:56.151018",
"automatic_updates": "off",
"policy_box": {
"profile": {
"subnet": "subnet-3412a250",
"volumes": [],
"pricing_info": {
"estimated_monthly": 417600,
"factor": 100000,
"hourly_price": 580,
"provider_type": "Amazon Web Services"
},
"image": "Linux Compute",
"elastic_ip": false,
"managed_os": false,
"instances": 1,
"keypair": "None",
"role": "None",
"location": "us-west-2",
"placement_group": "",
"cloud": "vpc-c52e9aa1",
"flavor": "t2.nano",
"security_groups": [
"Automatic"
],
"schema": "http://elasticbox.net/schemas/aws/ec2/profile"
},
"provider_id": "cdcb8062-c792-4f92-9099-fc77831f5e0f",
"automatic_updates": "off",
"name": "My Deployment Policy",
"created": "2018-12-12 10:19:21.170223",
"deleted": null,
"variables": [],
"updated": "2018-12-12 10:20:25.788933",
"lifespan": {
"operation": "terminate",
"interval": "hours",
"quantity": 1
},
"visibility": "workspace",
"members": [],
"claims": [],
"owner": "myworkspace",
"organization": "elasticbox",
"id": "0e37ec16-ac46-4fd6-a7d4-343b65982828",
"schema": "http://elasticbox.net/schemas/boxes/policy"
},
"name": "My Script Box",
"service": {
"type": "Linux Compute",
"id": "eb-e1uyz",
"machines": [
{
"state": "done",
"name": "my-script-box-eb-e1uyz-1",
"workflow": []
}
]
},
"tags": [],
"variables": [],
"created": "2018-12-12 10:21:48.709303",
"boxes": [
{
"updated": "2018-12-12 10:16:51.895046",
"automatic_updates": "off",
"requirements": [],
"name": "My Script Box",
"created": "2018-12-12 10:16:51.895046",
"deleted": null,
"variables": [],
"visibility": "workspace",
"id": "29a9fe00-517a-4635-a77c-6eb473f4d7a1",
"members": [],
"owner": "myworkspace",
"organization": "elasticbox",
"events": {},
"schema": "http://elasticbox.net/schemas/boxes/script"
}
],
"id": "i-8jo5n5",
"is_deploy_only": true,
"state": "done",
"members": [],
"owner": "myworkspace",
"bindings": [],
"uri": "/services/instances/i-8jo5n5",
"operation": {
"event": "deploy",
"workspace": "operations",
"created": "2018-12-12 10:27:53.778494"
},
"schema": "http://elasticbox.net/schemas/instance"
}
]
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
Resource | 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.
URL
Structure
[POST] /services/blobs/upload
Example
[POST] https://cam.ctl.io/services/blobs/upload
Request
Headers
Content-Type: multipart/form-data
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
- None
Request body parameters
- Form data: blob (binary)
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Bad Request
- 401 Unauthorized
Response Parameters
Parameter | Type | Description |
---|---|---|
content-type | string | File content type |
length | number | File size in bytes |
upload_date | string | Date when file was uploaded |
url | string | Url to download the file |
Response Body
{
"url": "/services/blobs/download/5be2de281862a32389a50d81/Screen-Shot-2018-11-07-at-13.44.12.png",
"upload_date": "2018-11-07 12:44:24.254860",
"length": 12715,
"content_type": "image/png"
}
POST /services/blobs/upload/{file_name}
Creates a blob from submitted data.
URL
Structure
[POST] /services/blobs/upload/{file_name}
Example
[POST] https://cam.ctl.io/services/blobs/upload/another-file-name.png
Request
Headers
Content-Type: multipart/form-data
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
- None
Request body parameters
- Form data: blob (binary)
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Bad Request
- 401 Unauthorized
Response Parameters
Parameter | Type | Description |
---|---|---|
content-type | string | File content type |
length | number | File size in bytes |
upload_date | string | Date when file was uploaded |
url | string | Url to download the file |
Response Body
{
"url": "/services/blobs/download/5be30e001862a32389a50d8f/another-file-name.png",
"upload_date": "2018-11-07 16:08:32.178537",
"length": 7264,
"content_type": "multipart/form-data; boundary=--------------------------077273512344925050592348"
}
GET /services/blobs/download/{file_id}/{file_name}
Downloads a file uploaded previously.
URL
Structure
[GET] /services/blobs/download/{file_id}/{file_name}
Example
[GET] https://cam.ctl.io/services/blobs/download/5be2de281862a32389a50d81/Screen-Shot-2018-11-07-at-13.44.12.png
Request
Headers
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
NAME | TYPE | DESCRIPTION | REQ. |
---|---|---|---|
file_id | string | File id | Yes |
file_name | string | File name | Yes |
Request body parameters
- None
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Bad Request
- 401 Unauthorized
Response Parameters
Parameter | Type | Description |
---|---|---|
content-type | string | File content type |
length | number | File size in bytes |
upload_date | string | Date when file was uploaded |
url | string | Url to download the file |
Response Body
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
Resource | 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
Resource | 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.
Some examples include:
Example |
---|
Create a CloudFormation box with template |
Modify the CloudFormation Template |
Launch a CloudFormation Box |
Update a CloudFormation Stack in Real-Time |
GET /services/boxes
Gets boxes that are accessible in the personal workspace of the authenticated user.
URL
Structure
[GET] /services/boxes
[GET] /services/boxes?ids=value
Example
[GET] https://cam.ctl.io/services/boxes
An example with parameters to specify a list of boxes IDs.
[GET] https://cam.ctl.io/services/boxes?ids=8117657c-572a-4608-a2e2-82204ffa2ba5,540da08f-bbcf-4bb8-95bb-fcb690d44268
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Style | Type | Description | Req. |
---|---|---|---|---|
ids | plain | string | Comma-separate list of boxes IDs | Opt. |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Invalid Data
Response Parameters
Parameter | Style | Type | Description |
---|---|---|---|
visibility | plain | string | 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: |
organization | plain | string | Organization to which the box belongs. |
updated | plain | string | Date of the last update. |
description | plain | string | Box description. |
requirements | plain | array | Box requirements. |
variables | plain | array | List of box variables, each variable object contains the parameters: type, name, value, visibility, required, etc. |
created | plain | string | Creation date. |
uri | plain | string | Box uri. |
id | plain | array | Box unique identificator. |
schema | plain | string | Box schema uri. |
members | plain | array | List of Box members. |
owner | plain | string | Box owner. |
icon | plain | string | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path. |
name | plain | string | Box name. |
Response Body
[
{
"automatic_updates": "off",
"variables": [
{
"required": false,
"type": "Text",
"name": "MNESIA_BASE",
"value": "/var/lib/rabbitmq/mnesia",
"visibility": "public"
},
{
"required": false,
"type": "Text",
"name": "LOG_BASE",
"value": "/var/log/rabbitmq",
"visibility": "public"
},
{
"name": "VERSION",
"required": false,
"value": "3.2.4",
"visibility": "public",
"type": "Options",
"options": "3.2.4,3.3.5"
},
{
"required": false,
"type": "Port",
"name": "mgmt",
"value": "15672",
"visibility": "public"
},
{
"required": false,
"type": "Port",
"name": "rabbitmq",
"value": "5672",
"visibility": "public"
},
{
"required": false,
"type": "Text",
"name": "username",
"value": "",
"visibility": "public"
},
{
"required": false,
"type": "Password",
"name": "password",
"value": "",
"visibility": "public"
},
{
"name": "CLONE_URL",
"required": false,
"visibility": "public",
"value": "https://github.com/ElasticBox/rabbitmq.git",
"scope": "github.git_repo",
"type": "Text"
},
{
"name": "PUPPET_DEFAULT",
"required": false,
"visibility": "public",
"value": "/services/blobs/download/53550d367d0083337633e563/default.pp",
"scope": "puppet",
"type": "File"
},
{
"required": false,
"type": "Port",
"name": "ssl_port",
"value": "5671",
"visibility": "public"
},
{
"required": false,
"type": "Text",
"name": "CA_CERT_PATH",
"value": "",
"visibility": "public"
},
{
"required": false,
"type": "Text",
"name": "SERVER_CERT_PATH",
"value": "",
"visibility": "public"
},
{
"required": false,
"type": "Text",
"name": "SERVER_KEY_PATH",
"value": "",
"visibility": "public"
},
{
"required": false,
"type": "File",
"name": "CA_CERT_FILE",
"value": "/services/blobs/download/530fc09a3d0a0c698ab6fb78/Blank_file",
"visibility": "public"
},
{
"required": false,
"type": "File",
"name": "SERVER_CERT_FILE",
"value": "/services/blobs/download/530fc09a3d0a0c698ab6fb78/Blank_file",
"visibility": "public"
},
{
"required": false,
"type": "File",
"name": "SERVER_KEY_FILE",
"value": "/services/blobs/download/530fc09a3d0a0c698ab6fb78/Blank_file",
"visibility": "public"
},
{
"automatic_updates": "off",
"name": "github",
"required": false,
"value": "758de981-475a-47fc-b0d9-342edda52a82",
"visibility": "public",
"type": "Box"
},
{
"automatic_updates": "off",
"name": "puppet",
"required": false,
"value": "08cc115c-4738-4f69-a8b7-da2e1dfec27c",
"visibility": "public",
"type": "Box"
},
{
"name": "CLONE_DIRECTORY",
"required": false,
"visibility": "public",
"value": "/etc/puppet/modules/rabbitmq",
"scope": "github.git_repo",
"type": "Text"
}
],
"friendly_id": "rabbitmq",
"owner": "elasticbox",
"id": "540da08f-bbcf-4bb8-95bb-fcb690d44268",
"requirements": [
"linux"
],
"deleted": null,
"version": {
"box": "be59362e-87d8-4be3-addd-8363b07a2ae4",
"number": {
"major": 0,
"minor": 1,
"patch": 3
},
"workspace": "matt",
"description": "Updated Icon"
},
"readme": {
"url": "/services/blobs/download/55db2cc60468cd7d5cd7ce04/rabbitmq.mdown",
"upload_date": "2015-08-24 14:40:06.536836",
"length": 4415,
"content_type": "application/octet-stream"
},
"events": {
"pre_install": {
"url": "/services/blobs/download/53571d577d0083337633e8eb/pre_install",
"upload_date": "2014-02-14 15:10:18.540864",
"length": 614,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"schema": "http://elasticbox.net/schemas/boxes/script",
"updated": "2015-12-22 22:16:30.618152",
"description": "Robust and easy-to-use messaging for applications",
"icon_metadata": {
"image": "images/platform/technologies/rabbitmq.svg",
"border": "#EE5715",
"fill": "#FF6E0D"
},
"visibility": "public",
"members": [],
"categories": [
"Message Broker"
],
"icon": "/icons/boxes/be59362e-87d8-4be3-addd-8363b07a2ae4",
"name": "RabbitMQ",
"created": "2015-12-22 22:19:13.638201",
"uri": "/services/boxes/540da08f-bbcf-4bb8-95bb-fcb690d44268",
"organization": "elasticbox",
"draft_from": "8698cbcc-d24e-4258-b18a-df9dd526e4d4"
},
{
"schema": "http://elasticbox.net/schemas/boxes/cloudformation",
"updated": "2015-05-22 20:25:17.104346",
"automatic_updates": "off",
"requirements": [
"oracle"
],
"description": "Oracle Database as a Service",
"created": "2014-02-14 15:09:53.382579",
"icon_metadata": {
"image": "images/platform/oracle.png",
"border": "#F8F8F9",
"fill": "#FFFFFF"
},
"variables": [
{
"required": false,
"type": "Port",
"name": "port",
"value": "1521",
"visibility": "public"
},
{
"required": true,
"type": "Text",
"name": "username",
"value": "",
"visibility": "public"
},
{
"required": true,
"type": "Password",
"name": "password",
"value": "",
"visibility": "public"
},
{
"required": false,
"type": "Text",
"name": "database_name",
"value": "",
"visibility": "public"
}
],
"uri": "/services/boxes/8117657c-572a-4608-a2e2-82204ffa2ba5",
"visibility": "public",
"name": "Oracle Database Service",
"deleted": null,
"members": [],
"owner": "public",
"organization": "ebx",
"type": "Oracle Database Service",
"id": "8117657c-572a-4608-a2e2-82204ffa2ba5",
"draft_from": "67695551-7ca9-4f90-bb00-7e8bf774c487",
"icon": "/icons/boxes/8117657c-572a-4608-a2e2-82204ffa2ba5"
}
]
POST /services/boxes
Creates a new box in the personal workspace and gets the created box.
URL
Structure
[POST] /services/boxes
Example
[POST] https://cam.ctl.io/services/boxes
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
- None
Request Body Parameters
Parameter | Style | Type | Description | Req. |
---|---|---|---|---|
requirements | plain | array | Box requirements. | |
owner | plain | string | Box owner, the user name for a personal workspace and the workspace name for a team workspace. | |
visibility | plain | string | 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: |
|
name | plain | string | Box name. | Yes |
description | plain | string | Box description. | |
icon | plain | string | Icon url. | |
schema | plain | string | Box schema. | Yes |
Request Body
{
"owner": "operation",
"schema":"http://elasticbox.net/schemas/boxes/script",
"requirements":["linux","apache"],
"automatic_updates":"off",
"name":"Test Starter Box",
"description":"Test Started for our showcase",
"variables": [
{
"required": false,
"type": "Text",
"name": "variable_name",
"value": ""
}
]
}
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Invalid Data
- 409 Conflict
Response Parameters
Parameter | Style | Type | Description |
---|---|---|---|
visibility | plain | string | 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: |
organization | plain | string | Organization to which the box belongs. |
updated | plain | string | Date of the last update. |
description | plain | string | Box description. |
requirements | plain | array | Box requirements. |
variables | plain | array | List of box variables, each variable object contains the parameters: type, name, value, visibility, required, etc. |
created | plain | string | Creation date. |
uri | plain | string | Box uri. |
id | plain | array | Box unique identificator. |
schema | plain | string | Box schema uri. |
members | plain | array | List of Box members. |
owner | plain | string | Box owner. |
icon | plain | string | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path. |
name | plain | string | Box name. |
Response Body
{
"updated": "2018-12-28 15:05:52.816432",
"automatic_updates": "off",
"requirements": [
"apache",
"linux"
],
"description": "Test Started for our showcase",
"created": "2018-12-28 15:05:52.816432",
"deleted": null,
"variables": [
{
"required": false,
"type": "Text",
"name": "variable_name",
"value": "",
"visibility": "public"
}
],
"uri": "/services/boxes/0e725f03-052b-43e2-8c5d-32341bf60a8d",
"visibility": "workspace",
"events": {},
"members": [],
"owner": "operation",
"organization": "centurylink",
"schema": "http://elasticbox.net/schemas/boxes/script",
"id": "0e725f03-052b-43e2-8c5d-32341bf60a8d",
"name": "Test Starter Box"
}
GET /services/boxes/{box_id}
Fetches an existing box, requires the specified id box_id.
URL
Structure
[GET] /services/boxes/{box_id}
Example
[GET] https://cam.ctl.io/services/boxes/0e725f03-052b-43e2-8c5d-32341bf60a8d
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
box_id | string | Box id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 403 Forbidden
- 404 Not Found
Response Parameters
Parameter | Style | Type | Description |
---|---|---|---|
visibility | plain | string | 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: |
organization | plain | string | Organization to which the box belongs. |
updated | plain | string | Date of the last update. |
description | plain | string | Box description. |
requirements | plain | array | Box requirements. |
variables | plain | array | List of box variables, each variable object contains the parameters: type, name, value, visibility, required, etc. |
created | plain | string | Creation date. |
uri | plain | string | Box uri. |
id | plain | array | Box unique identificator. |
schema | plain | string | Box schema uri. |
members | plain | array | List of Box members. |
owner | plain | string | Box owner. |
icon | plain | string | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path. |
name | plain | string | Box name. |
Response Body
{
"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.
URL
Structure
[PUT] /services/boxes/{box_id}
Example
[PUT] https://cam.ctl.io/services/boxes/{box_id}
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Style | Type | Description | Req. |
---|---|---|---|---|
box_id | plain | string | Box id | Yes |
Request Body Parameters
Parameter | Style | Type | Description | Req. |
---|---|---|---|---|
updated | plain | string | Date of the last update. | |
description | plain | string | Box description. | |
requirements | plain | array | Box requirements. | |
variables | plain | array | List of box variables, each variable object contains the parameters: type, name, value, visibility, required, etc. | |
created | plain | string | Creation date. | |
uri | plain | string | Box uri. | |
id | plain | array | Box unique identificator. | |
schema | plain | string | Box schema uri. | Yes |
members | plain | array | List of Box members. | |
owner | plain | string | Box owner. | Yes |
organization | plain | string | Organization to which the box belongs. | Yes |
icon | plain | string | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path. | |
name | plain | string | Box name. | Yes |
Request Body
{
"schema":"http://elasticbox.net/schemas/boxes/script",
"updated":"2018-28-12 16:23:46.702968",
"automatic_updates":"off",
"requirements":[
"linux"
],
"description":"New description set",
"created":"2015-07-02 16:20:15.098554",
"deleted":null,
"variables":[
{
"required":false,
"type":"Text",
"name":"variable_name",
"value":"Default value",
"visibility":"public"
}
],
"uri":"/services/boxes/9192cb3e-04e2-4c50-b8a5-a25c980479d4",
"visibility":"workspace",
"events":{},
"members":[],
"owner":"operation",
"organization":"elasticbox",
"id":"0e725f03-052b-43e2-8c5d-32341bf60a8d",
"name":"Rename Test Starter Box"
}
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Invalid Data
- 403 Forbidden
- 404 Not Found
Response Parameters
Parameter | Style | Type | Description |
---|---|---|---|
visibility | plain | string | 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: |
organization | plain | string | Organization to which the box belongs. |
updated | plain | string | Date of the last update. |
description | plain | string | Box description. |
requirements | plain | array | Box requirements. |
variables | plain | array | List of box variables, each variable object contains the parameters: type, name, value, visibility, required, etc. |
created | plain | string | Creation date. |
uri | plain | string | Box uri. |
id | plain | array | Box unique identificator. |
schema | plain | string | Box schema uri. |
members | plain | array | List of Box members. |
owner | plain | string | Box owner. |
icon | plain | string | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path. |
name | plain | string | Box name. |
Response Body
{
"updated": "2018-12-28 16:07:08.238548",
"automatic_updates": "off",
"requirements": [
"linux"
],
"description": "New description",
"name": "Rename Test Starter Box",
"created": "2018-12-28 15:05:52.816432",
"deleted": null,
"variables": [
{
"required": false,
"type": "Text",
"name": "variable_name",
"value": "Default value",
"visibility": "public"
}
],
"uri": "/services/boxes/0e725f03-052b-43e2-8c5d-32341bf60a8d",
"visibility": "workspace",
"id": "0e725f03-052b-43e2-8c5d-32341bf60a8d",
"members": [],
"owner": "operation",
"organization": "centurylink",
"events": {},
"schema": "http://elasticbox.net/schemas/boxes/script"
}
DELETE /services/boxes/{box_id}
Deletes an existing box, requires the specified id box_id.
URL
Structure
[DELETE] /services/boxes/{box_id}
Example
[DELETE] https://cam.ctl.io/services/boxes/0e725f03-052b-43e2-8c5d-32341bf60a8d
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Style | Type | Description | Req. |
---|---|---|---|---|
box_id | plain | string | Box id | Yes |
Response
Normal Response Codes
- 204 OK
Common Error Response Codes
- 403 Forbidden
- 404 Not Found
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.
URL
Structure
[GET] /services/boxes//{box_id}/stack
Example
[GET] https://cam.ctl.io/services/boxes/f4dd017f-4bec-42f4-9614-bd27fd8baf74/stack
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
box_id | string | Box id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Bad Request
Response Parameters
Parameter | Style | Type | Description |
---|---|---|---|
visibility | plain | string | 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: |
organization | plain | string | Organization to which the box belongs. |
updated | plain | string | Date of the last update. |
description | plain | string | Box description. |
tags | plain | array | Box tags. |
variables | plain | array | List of box variables, each variable object contains the parameters: type, name, value, visibility, required, etc. |
created | plain | string | Creation date. |
uri | plain | string | Box uri. |
id | plain | array | Box unique identificator. |
schema | plain | string | Box schema uri. |
members | plain | array | List of Box members. |
owner | plain | string | Box owner. |
icon | plain | string | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path. |
name | plain | string | Box name. |
Response Body
The following example is of the Box that install and configure Magento using nginx and php-fpm boxes to run the application.
[
{
"schema": "http://elasticbox.net/schemas/boxes/script",
"updated": "2015-12-22 23:11:27.168377",
"automatic_updates": "off",
"requirements": [
"linux"
],
"description": "HA proxy for MySQL",
"created": "2015-11-30 19:51:27.665743",
"deleted": null,
"variables": [
{
"automatic_updates": "major",
"name": "haproxy",
"required": false,
"visibility": "private",
"value": "87830b58-ceaf-4790-81d1-4511816b012f",
"type": "Box"
},
{
"name": "http",
"required": false,
"visibility": "internal",
"value": "3306",
"scope": "haproxy",
"type": "Port"
},
{
"name": "fallback_binding_port",
"required": false,
"visibility": "internal",
"value": "3306",
"scope": "haproxy",
"type": "Port"
},
{
"name": "CONFIG_FILE",
"required": false,
"visibility": "internal",
"value": "/services/blobs/download/56719884974c520dbaf06db0/haproxy.conf",
"scope": "haproxy",
"type": "File"
},
{
"name": "MODE",
"required": false,
"visibility": "internal",
"value": "tcp",
"scope": "haproxy",
"type": "Options",
"options": "http,tcp,health"
}
],
"uri": "/services/boxes/f6deab86-3744-4be3-bd48-804697859423",
"visibility": "workspace",
"name": "MySQL HA Proxy",
"icon_metadata": {
"image": "images/platform/technologies/mysql.svg",
"border": "#227C95",
"fill": "#ffffff"
},
"events": {
"configure": {
"url": "/services/blobs/download/565d277217fe944e08464179/configure",
"length": 1033,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
},
"install": {
"url": "/services/blobs/download/565e37a9b1ac9f56ad579a8d/install",
"length": 634,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"members": [
{
"role": "collaborator",
"workspace": "rackspace1"
}
],
"owner": "super",
"organization": "elasticbox",
"id": "f6deab86-3744-4be3-bd48-804697859423",
"icon": "/icons/boxes/f6deab86-3744-4be3-bd48-804697859423"
},
{
"automatic_updates": "off",
"variables": [
{
"required": false,
"type": "Port",
"name": "http",
"value": "80",
"visibility": "public"
},
{
"required": false,
"type": "Port",
"name": "fallback_binding_port",
"value": "80",
"visibility": "public"
},
{
"required": false,
"type": "Text",
"name": "CONFIG_FILE_NAME",
"value": "haproxy.cfg",
"visibility": "public"
},
{
"required": false,
"type": "File",
"name": "CONFIG_FILE",
"value": "/services/blobs/download/55dc3b66b8485e51a2a7d236/haproxy.conf",
"visibility": "public"
},
{
"name": "MODE",
"required": false,
"visibility": "public",
"value": "http",
"type": "Options",
"options": "http,tcp,health"
},
{
"required": false,
"type": "Binding",
"name": "servers",
"value": "AnyBox",
"visibility": "private"
}
],
"friendly_id": "haproxy",
"owner": "elasticbox",
"id": "87830b58-ceaf-4790-81d1-4511816b012f",
"requirements": [
"linux"
],
"icon_metadata": {
"image": "images/platform/technologies/haproxy.svg",
"border": "#3F52AA",
"fill": "#ffffff"
},
"version": {
"box": "fbe1f028-d95e-4bde-958b-00a5d5ca50d6",
"number": {
"major": 0,
"minor": 1,
"patch": 4
},
"workspace": "arnaud-elasticbox",
"description": "Fix apt-get update"
},
"readme": {
"url": "#application-lifecycle-management-services/blobs/download/565e1bedb1ac9f56ad57986a/readme",
"upload_date": "2015-12-01 22:15:09.369640",
"length": 1778,
"content_type": "text/x-markdown"
},
"events": {
"start": {
"url": "/services/blobs/download/55dc3b65b8485e51a2a7d234/start",
"upload_date": "2015-08-25 09:54:45.995814",
"length": 40,
"destination_path": "scripts",
"content_type": null
},
"configure": {
"url": "/services/blobs/download/565cfea1b1ac9f56ad57867b/configure",
"upload_date": "2015-08-25 09:54:44.800362",
"length": 102,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
},
"install": {
"url": "/services/blobs/download/565e26e017fe944e08465290/install",
"upload_date": "2015-08-25 09:54:43.653716",
"length": 524,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"schema": "http://elasticbox.net/schemas/boxes/script",
"updated": "2015-12-22 22:30:31.610021",
"description": "Reliable, High Performance, TCP / HTTP Load Balancer",
"deleted": null,
"visibility": "public",
"members": [],
"categories": [
"Load Balancer"
],
"icon": "/services/blobs/download/55e6ca6bdda62a64df899596/haproxy.png",
"name": "HAProxy",
"created": "2015-12-01 23:02:07.975395",
"uri": "/services/boxes/87830b58-ceaf-4790-81d1-4511816b012f",
"organization": "elasticbox",
"draft_from": "35b8e7c0-3074-48ed-9b89-28ec6f279830"
},
{
"schema": "http://elasticbox.net/schemas/boxes/script",
"updated": "2016-12-08 18:22:58.904383",
"automatic_updates": "off",
"requirements": [
"linux"
],
"description": "A free, open-source, high-performance HTTP server and",
"created": "2015-09-12 19:44:34.159558",
"deleted": null,
"variables": [
{
"required": false,
"type": "Port",
"name": "http",
"value": "80",
"visibility": "public"
},
{
"required": false,
"type": "File",
"name": "PUBLIC_SSL_CERTIFICATE",
"value": "/services/blobs/download/55f48216dda62a5eab4a41ca/public.crt",
"visibility": "internal"
},
{
"required": false,
"type": "File",
"name": "PRIVATE_SSL_KEY",
"value": "/services/blobs/download/55f4822bb1ac9f70ec5d4bb9/private.key",
"visibility": "internal"
},
{
"required": false,
"type": "File",
"name": "NGINX_CONF",
"value": "/services/blobs/download/57325a5636b43a30a1fb77f7/nginx.conf",
"visibility": "internal"
},
{
"required": false,
"type": "Text",
"name": "NGINX_USER",
"value": "root",
"visibility": "internal"
},
{
"required": false,
"type": "Text",
"name": "NGINX_GROUP",
"value": "root",
"visibility": "internal"
},
{
"required": false,
"type": "Text",
"name": "LOG_PATH",
"value": "/var/log/nginx",
"visibility": "internal"
},
{
"required": false,
"type": "Text",
"name": "CACHE_PATH",
"value": "/var/nginx/cache",
"visibility": "internal"
},
{
"required": false,
"type": "Text",
"name": "CERTIFICATE_PATH",
"value": "/var/nginx/certificates",
"visibility": "internal"
}
],
"readme": {
"url": "#application-lifecycle-management-services/blobs/download/56297b2fb1ac9f4d02d1c2ab/readme",
"upload_date": "2015-10-23 00:11:27.558696",
"length": 2278,
"content_type": "text/x-markdown"
},
"uri": "/services/boxes/8e176772-5c6c-4d5a-8f6e-cbf342142520",
"visibility": "workspace",
"name": "Nginx",
"icon_metadata": {
"image": "images/platform/technologies/nginx.svg",
"border": "#007731",
"fill": "#00964C"
},
"events": {
"start": {
"url": "/services/blobs/download/565e31b5b1ac9f56ad57999b/start",
"length": 91,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
},
"configure": {
"url": "/services/blobs/download/56673867dda62a46af5b4275/configure",
"length": 519,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
},
"install": {
"url": "/services/blobs/download/57e55ad5c60625154acebee3/install",
"length": 1515,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"members": [
{
"role": "collaborator",
"workspace": "rackspace1"
}
],
"owner": "super",
"organization": "elasticbox",
"id": "8e176772-5c6c-4d5a-8f6e-cbf342142520",
"draft_from": "790e4791-be29-40fa-85ca-619dd3061ced",
"icon": "/icons/boxes/8e176772-5c6c-4d5a-8f6e-cbf342142520"
},
{
"schema": "http://elasticbox.net/schemas/boxes/script",
"updated": "2016-12-08 18:34:39.878898",
"automatic_updates": "off",
"requirements": [
"internal",
"linux"
],
"name": "Magento",
"created": "2015-09-12 18:25:43.678013",
"deleted": null,
"variables": [
{
"name": "LOCAL_PATH",
"required": true,
"value": "/mnt/media",
"visibility": "internal",
"scope": "nfs",
"type": "Text"
},
{
"name": "CONFIG_FILE",
"required": false,
"value": "/services/blobs/download/565f3c92974c525666cd2f84/haproxy.conf",
"visibility": "public",
"scope": "redis.haproxy",
"type": "File"
},
{
"name": "CONFIG_FILE_NAME",
"required": false,
"value": "redis.cfg",
"visibility": "public",
"scope": "redis.haproxy",
"type": "Text"
},
{
"required": false,
"type": "Text",
"name": "MAGENTO_URL",
"value": "https://s3-us-west-1.amazonaws.com/ebx-public/magento-1.9.2.2.tar-2015-10-27-03-19-32.gz",
"visibility": "internal"
},
{
"required": false,
"type": "Text",
"name": "SERVER_NAME",
"value": "localhost",
"visibility": "public"
},
{
"required": false,
"type": "Port",
"name": "http",
"value": "80",
"visibility": "public"
},
{
"required": false,
"type": "File",
"name": "MAGENTO_CONF",
"value": "/services/blobs/download/565ca77d17fe944e08463a45/magento.conf",
"visibility": "internal"
},
{
"required": false,
"type": "File",
"name": "MAGENTO_CONFIG",
"value": "/services/blobs/download/565f3b1bb1ac9f56ad57b423/local.xml",
"visibility": "internal"
},
{
"required": false,
"type": "Text",
"name": "MAGENTO_PATH",
"value": "/opt/magento",
"visibility": "internal"
},
{
"automatic_updates": "major",
"name": "redis",
"required": false,
"value": "053c6467-13e4-47fb-b6cf-46f51e6c2294",
"visibility": "public",
"type": "Box"
},
{
"automatic_updates": "major",
"name": "mysql",
"required": false,
"value": "f6deab86-3744-4be3-bd48-804697859423",
"visibility": "public",
"type": "Box"
},
{
"automatic_updates": "major",
"name": "nginx",
"required": false,
"visibility": "internal",
"value": "8e176772-5c6c-4d5a-8f6e-cbf342142520",
"type": "Box"
},
{
"automatic_updates": "major",
"name": "php",
"required": false,
"value": "ed085cfd-8707-4ef7-9611-6e84498d27c6",
"visibility": "internal",
"type": "Box"
},
{
"automatic_updates": "major",
"name": "nfs",
"required": false,
"value": "320e8be7-5d05-4f74-a040-5d74836ae608",
"visibility": "public",
"type": "Box"
}
],
"description": "Magento Web Layer",
"readme": {
"url": "#application-lifecycle-management-services/blobs/download/563a84b1dda62a1ca8ed5bdb/readme",
"upload_date": "2015-11-04 22:20:33.241618",
"length": 2264,
"content_type": "text/x-markdown"
},
"uri": "/services/boxes/f4dd017f-4bec-42f4-9614-bd27fd8baf74",
"visibility": "workspace",
"events": {
"configure": {
"url": "/services/blobs/download/566604fcb1ac9f56ad5809bf/configure",
"length": 702,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
},
"install": {
"url": "/services/blobs/download/565e1855dda62a46af5acc97/install",
"length": 829,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"icon_metadata": {
"image": "images/platform/technologies/magento.svg",
"border": "#191815",
"fill": "#31302B"
},
"members": [
{
"role": "collaborator",
"workspace": "rackspace1"
},
{
"role": "read",
"workspace": "centurylink"
}
],
"owner": "super",
"organization": "elasticbox",
"id": "f4dd017f-4bec-42f4-9614-bd27fd8baf74",
"draft_from": "de1841f7-cfbe-4443-a996-d13807271a18",
"icon": "/icons/boxes/f4dd017f-4bec-42f4-9614-bd27fd8baf74"
},
{
"schema": "http://elasticbox.net/schemas/boxes/script",
"updated": "2016-12-02 15:27:33.907741",
"automatic_updates": "off",
"requirements": [
"linux"
],
"description": "A simple and robust FastCGI Process Manager for PH",
"created": "2015-09-12 18:37:50.024980",
"deleted": null,
"variables": [
{
"required": false,
"type": "Text",
"name": "PHP_USER",
"value": "root",
"visibility": "internal"
},
{
"required": false,
"type": "Text",
"name": "PHP_GROUP",
"value": "root",
"visibility": "internal"
},
{
"required": false,
"type": "Text",
"name": "LOGS_DIRECTORY",
"value": "/var/log/php-fpm",
"visibility": "internal"
},
{
"required": false,
"type": "File",
"name": "PHP_INI",
"value": "/services/blobs/download/565deff917fe944e084647bf/php.ini",
"visibility": "internal"
},
{
"required": false,
"type": "File",
"name": "PHP_FPM_CONF",
"value": "/services/blobs/download/55f498d917fe94678daaf710/www.conf",
"visibility": "internal"
}
],
"uri": "/services/boxes/ed085cfd-8707-4ef7-9611-6e84498d27c6",
"visibility": "workspace",
"name": "PHP-FPM",
"icon_metadata": {
"image": "images/platform/technologies/php.svg",
"border": "#484F8C",
"fill": "#6068A4"
},
"events": {
"start": {
"url": "/services/blobs/download/584190645939a07e69c92cdc/start",
"length": 140,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
},
"configure": {
"url": "/services/blobs/download/565f491217fe944e08466e01/configure",
"length": 535,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
},
"install": {
"url": "/services/blobs/download/565e173517fe944e084651ea/install",
"length": 1408,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"members": [
{
"role": "collaborator",
"workspace": "rackspace1"
}
],
"organization": "elasticbox",
"readme": {
"url": "#application-lifecycle-management-services/blobs/download/56297bc9dda62a3b79416cbb/readme",
"upload_date": "2015-10-23 00:14:01.384408",
"length": 2570,
"content_type": "text/x-markdown"
},
"owner": "super",
"id": "ed085cfd-8707-4ef7-9611-6e84498d27c6",
"draft_from": "be643a40-e7e8-435a-a857-e06fe5854c3c",
"icon": "/icons/boxes/ed085cfd-8707-4ef7-9611-6e84498d27c6"
},
{
"schema": "http://elasticbox.net/schemas/boxes/script",
"updated": "2015-12-22 23:12:59.290608",
"automatic_updates": "off",
"requirements": [
"linux"
],
"description": "HA Proxy for Redis cluster",
"created": "2015-11-30 19:44:48.523649",
"deleted": null,
"variables": [
{
"automatic_updates": "major",
"name": "haproxy",
"required": false,
"visibility": "private",
"value": "87830b58-ceaf-4790-81d1-4511816b012f",
"type": "Box"
},
{
"name": "CONFIG_FILE",
"required": false,
"visibility": "public",
"value": "/services/blobs/download/565cac16b1ac9f56ad578071/haproxy.conf",
"scope": "haproxy",
"type": "File"
},
{
"name": "MODE",
"required": false,
"value": "tcp",
"visibility": "public",
"scope": "haproxy",
"type": "Options",
"options": "http,tcp,health"
}
],
"uri": "/services/boxes/053c6467-13e4-47fb-b6cf-46f51e6c2294",
"visibility": "workspace",
"name": "Redis HA Proxy",
"icon_metadata": {
"image": "images/platform/technologies/redis.svg",
"border": "#18191C",
"fill": "#2A2C30"
},
"events": {
"install": {
"url": "/services/blobs/download/565e380bdda62a46af5acef5/install",
"length": 417,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"members": [
{
"role": "collaborator",
"workspace": "rackspace1"
}
],
"owner": "super",
"organization": "elasticbox",
"id": "053c6467-13e4-47fb-b6cf-46f51e6c2294",
"icon": "/icons/boxes/053c6467-13e4-47fb-b6cf-46f51e6c2294"
},
{
"schema": "http://elasticbox.net/schemas/boxes/script",
"updated": "2016-09-08 16:30:40.026518",
"automatic_updates": "off",
"requirements": [
"linux"
],
"description": "Mounts an NFS endpoint",
"created": "2015-09-13 20:28:14.119832",
"deleted": null,
"variables": [
{
"required": true,
"type": "Text",
"name": "LOCAL_PATH",
"value": "",
"visibility": "public"
},
{
"required": false,
"type": "Binding",
"name": "server",
"value": "894c39a1-169f-4cfb-a377-20fd41ab95d5",
"visibility": "private"
}
],
"uri": "/services/boxes/320e8be7-5d05-4f74-a040-5d74836ae608",
"visibility": "workspace",
"name": "NFS Client",
"owner": "super",
"icon_metadata": {
"image": "images/platform/abstract/disk.svg",
"border": "#14427A",
"fill": "#246099"
},
"events": {
"configure": {
"url": "/services/blobs/download/5667372db1ac9f56ad580ebc/configure",
"length": 271,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
},
"install": {
"url": "/services/blobs/download/566736f6dda62a46af5b4272/install",
"length": 213,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"members": [
{
"role": "collaborator",
"workspace": "rackspace1"
}
],
"readme": {
"url": "#application-lifecycle-management-services/blobs/download/56297c02b1ac9f4d02d1c2ae/readme",
"upload_date": "2015-10-23 00:14:58.186697",
"length": 1515,
"content_type": "text/x-markdown"
},
"organization": "elasticbox",
"id": "320e8be7-5d05-4f74-a040-5d74836ae608",
"draft_from": "7a24d2c7-8e8b-45bb-8a9c-eaf6899d3e85",
"icon": "/icons/boxes/320e8be7-5d05-4f74-a040-5d74836ae608"
}
]
GET /services/boxes/{box_id}/bindings
Gets a list of box objects that are bindings of the requested box. Requires the specified box id as a parameter box_id.
URL
Structure
[GET] /services/boxes//{box_id}/bindings
Example
[GET] https://cam.ctl.io/services/boxes/f4dd017f-4bec-42f4-9614-bd27fd8baf74/bindings
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
box_id | string | Box id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Bad Request
Response Parameters
Parameter | Style | Type | Description |
---|---|---|---|
uri | plain | string | Box uri. |
id | plain | array | Box unique identificator. |
icon | plain | string | Box icon uri. |
name | plain | string | Box name. |
Response Body
[
{
"uri": "/services/boxes/894c39a1-169f-4cfb-a377-20fd41ab95d5",
"name": "NFS Server",
"icon": "/icons/boxes/894c39a1-169f-4cfb-a377-20fd41ab95d5",
"id": "894c39a1-169f-4cfb-a377-20fd41ab95d5"
}
]
GET /services/boxes/{box_id}/versions
Gets a list of box versions for the requested box. Requires the specified box id as a parameter box_id. If the specified box is unversioned it obtains an empty list.
URL
Structure
[GET] /services/boxes//{box_id}/versions
Example
[GET] https://cam.ctl.io/services/boxes/f4dd017f-4bec-42f4-9614-bd27fd8baf74/versions
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
box_id | string | Box id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 403 Forbidden
- 404 Not Found
Response Parameters
Parameter | Style | Type | Description |
---|---|---|---|
updated | plain | string | Date of the last update. |
description | plain | string | Box description. |
tags | plain | array | Box tags. |
variables | plain | array | List of box variables, each variable object contains the parameters: type, name, value, visibility, required, etc. |
members | plain | array | List of Box members. |
owner | plain | string | Box owner. |
id | plain | array | Box unique identificator. |
icon | plain | string | Box icon uri. |
visibility | plain | string | 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: |
organization | plain | string | Organization to which the box belongs. |
name | plain | string | Box name. |
created | plain | string | Creation date. |
uri | plain | string | Box uri. |
version | plain | object | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path. |
schema | plain | string | Box schema uri. |
Response Body
[
{
"schema": "http://elasticbox.net/schemas/boxes/script",
"updated": "2016-11-22 13:39:23.680784",
"automatic_updates": "off",
"requirements": [
"internal",
"linux"
],
"description": "Magento Web Layer",
"created": "2016-05-10 22:03:20.342575",
"deleted": null,
"variables": [
{
"name": "LOCAL_PATH",
"required": true,
"value": "/mnt/media",
"visibility": "internal",
"scope": "nfs",
"type": "Text"
},
{
"name": "CONFIG_FILE",
"required": false,
"value": "/services/blobs/download/565f3c92974c525666cd2f84/haproxy.conf",
"visibility": "public",
"scope": "redis.haproxy",
"type": "File"
},
{
"name": "CONFIG_FILE_NAME",
"required": false,
"value": "redis.cfg",
"visibility": "public",
"scope": "redis.haproxy",
"type": "Text"
},
{
"required": false,
"type": "Text",
"name": "MAGENTO_URL",
"value": "https://s3-us-west-1.amazonaws.com/ebx-public/magento-1.9.2.2.tar-2015-10-27-03-19-32.gz",
"visibility": "internal"
},
{
"required": false,
"type": "Text",
"name": "SERVER_NAME",
"value": "localhost",
"visibility": "public"
},
{
"required": false,
"type": "Port",
"name": "http",
"value": "80",
"visibility": "public"
},
{
"required": false,
"type": "File",
"name": "MAGENTO_CONF",
"value": "/services/blobs/download/565ca77d17fe944e08463a45/magento.conf",
"visibility": "internal"
},
{
"required": false,
"type": "File",
"name": "MAGENTO_CONFIG",
"value": "/services/blobs/download/565f3b1bb1ac9f56ad57b423/local.xml",
"visibility": "internal"
},
{
"required": false,
"type": "Text",
"name": "MAGENTO_PATH",
"value": "/opt/magento",
"visibility": "internal"
},
{
"automatic_updates": "major",
"name": "redis",
"required": false,
"value": "053c6467-13e4-47fb-b6cf-46f51e6c2294",
"visibility": "public",
"type": "Box"
},
{
"automatic_updates": "major",
"name": "mysql",
"required": false,
"value": "f6deab86-3744-4be3-bd48-804697859423",
"visibility": "public",
"type": "Box"
},
{
"automatic_updates": "major",
"name": "nginx",
"required": false,
"visibility": "internal",
"value": "8e176772-5c6c-4d5a-8f6e-cbf342142520",
"type": "Box"
},
{
"automatic_updates": "major",
"name": "php",
"required": false,
"value": "ed085cfd-8707-4ef7-9611-6e84498d27c6",
"visibility": "internal",
"type": "Box"
},
{
"automatic_updates": "major",
"name": "nfs",
"required": false,
"value": "320e8be7-5d05-4f74-a040-5d74836ae608",
"visibility": "public",
"type": "Box"
}
],
"readme": {
"url": "#application-lifecycle-management-services/blobs/download/563a84b1dda62a1ca8ed5bdb/readme",
"upload_date": "2015-11-04 22:20:33.241618",
"length": 2264,
"content_type": "text/x-markdown"
},
"uri": "/services/boxes/de1841f7-cfbe-4443-a996-d13807271a18",
"visibility": "workspace",
"name": "Magento",
"icon_metadata": {
"image": "images/platform/technologies/magento.svg",
"border": "#191815",
"fill": "#31302B"
},
"version": {
"box": "f4dd017f-4bec-42f4-9614-bd27fd8baf74",
"number": {
"major": 0,
"minor": 1,
"patch": 1
},
"workspace": "alberto",
"description": "Updated boxes"
},
"events": {
"configure": {
"url": "/services/blobs/download/566604fcb1ac9f56ad5809bf/configure",
"length": 702,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
},
"install": {
"url": "/services/blobs/download/565e1855dda62a46af5acc97/install",
"length": 829,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"members": [
{
"role": "collaborator",
"workspace": "rackspace1"
},
{
"role": "read",
"workspace": "centurylink"
}
],
"owner": "super",
"organization": "elasticbox",
"id": "de1841f7-cfbe-4443-a996-d13807271a18",
"icon": "/icons/boxes/f4dd017f-4bec-42f4-9614-bd27fd8baf74"
},
{
"schema": "http://elasticbox.net/schemas/boxes/script",
"updated": "2016-11-22 13:39:23.680784",
"automatic_updates": "off",
"requirements": [
"internal",
"linux"
],
"description": "Magento Web Layer",
"created": "2015-12-10 16:11:01.542052",
"icon_metadata": {
"image": "images/platform/technologies/magento.svg",
"border": "#191815",
"fill": "#31302B"
},
"variables": [
{
"name": "LOCAL_PATH",
"required": true,
"visibility": "internal",
"value": "/mnt/media",
"scope": "nfs",
"type": "Text"
},
{
"name": "CONFIG_FILE",
"required": false,
"visibility": "public",
"value": "/services/blobs/download/565f3c92974c525666cd2f84/haproxy.conf",
"scope": "redis.haproxy",
"type": "File"
},
{
"name": "CONFIG_FILE_NAME",
"required": false,
"visibility": "public",
"value": "redis.cfg",
"scope": "redis.haproxy",
"type": "Text"
},
{
"required": false,
"type": "Text",
"name": "SERVER_NAME",
"value": "localhost",
"visibility": "public"
},
{
"required": false,
"type": "Port",
"name": "http",
"value": "80",
"visibility": "public"
},
{
"required": false,
"type": "Text",
"name": "MAGENTO_URL",
"value": "https://s3-us-west-1.amazonaws.com/ebx-public/magento-1.9.2.2.tar-2015-10-27-03-19-32.gz",
"visibility": "internal"
},
{
"required": false,
"type": "File",
"name": "MAGENTO_CONF",
"value": "/services/blobs/download/565ca77d17fe944e08463a45/magento.conf",
"visibility": "internal"
},
{
"required": false,
"type": "File",
"name": "MAGENTO_CONFIG",
"value": "/services/blobs/download/565f3b1bb1ac9f56ad57b423/local.xml",
"visibility": "internal"
},
{
"required": false,
"type": "Text",
"name": "MAGENTO_PATH",
"value": "/opt/magento",
"visibility": "internal"
},
{
"automatic_updates": "major",
"name": "mysql",
"required": false,
"visibility": "public",
"value": "f6deab86-3744-4be3-bd48-804697859423",
"type": "Box"
},
{
"automatic_updates": "major",
"name": "redis",
"required": false,
"visibility": "public",
"value": "053c6467-13e4-47fb-b6cf-46f51e6c2294",
"type": "Box"
},
{
"automatic_updates": "major",
"name": "nginx",
"required": false,
"value": "8e176772-5c6c-4d5a-8f6e-cbf342142520",
"visibility": "internal",
"type": "Box"
},
{
"automatic_updates": "major",
"name": "php",
"required": false,
"visibility": "internal",
"value": "ed085cfd-8707-4ef7-9611-6e84498d27c6",
"type": "Box"
},
{
"automatic_updates": "major",
"name": "nfs",
"required": false,
"visibility": "public",
"value": "320e8be7-5d05-4f74-a040-5d74836ae608",
"type": "Box"
}
],
"readme": {
"url": "#application-lifecycle-management-services/blobs/download/563a84b1dda62a1ca8ed5bdb/readme",
"upload_date": "2015-11-04 22:20:33.241618",
"length": 2264,
"content_type": "text/x-markdown"
},
"uri": "/services/boxes/e75f27f6-fded-4647-8630-bd99cf62fcee",
"visibility": "workspace",
"name": "Magento",
"deleted": null,
"version": {
"box": "f4dd017f-4bec-42f4-9614-bd27fd8baf74",
"number": {
"major": 0,
"minor": 1,
"patch": 0
},
"workspace": "diego",
"description": "automatic"
},
"events": {
"configure": {
"url": "/services/blobs/download/566604fcb1ac9f56ad5809bf/configure",
"length": 702,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
},
"install": {
"url": "/services/blobs/download/565e1855dda62a46af5acc97/install",
"length": 829,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"members": [
{
"role": "collaborator",
"workspace": "rackspace1"
},
{
"role": "read",
"workspace": "centurylink"
}
],
"owner": "super",
"organization": "elasticbox",
"id": "e75f27f6-fded-4647-8630-bd99cf62fcee",
"icon": "/services/blobs/download/55f46e1c974c52710858afb6/magento.png"
}
]
PUT /services/boxes/{box_id}/diff
Compares a box to the submitted box. Requires the specified box id as parameter box_id.
URL
Structure
[PUT] /services/boxes//{box_id}/diff
Example
[PUT] https://cam.ctl.io/services/boxes/f4dd017f-4bec-42f4-9614-bd27fd8baf74/diff
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Style | Type | Description | Req. |
---|---|---|---|---|
box_id | plain | string | Box id | Yes |
Request Body Parameters
Parameter | Style | Type | Description | Req. |
---|---|---|---|---|
updated | plain | string | Date of the last update. | |
description | plain | string | Box description. | |
tags | plain | array | Box tags. | |
variables | plain | array | List of box variables, each variable object contains the parameters: type, name, value, visibility, required, etc. | |
members | plain | array | List of Box members. | |
owner | plain | string | Box owner. | Yes |
id | plain | array | Box unique identificator. | Yes |
icon | plain | string | Box icon uri. | |
visibility | plain | string | 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: |
|
organization | plain | string | Organization to which the box belongs. | Yes |
name | plain | string | Box name. | Yes |
created | plain | string | Creation date. | |
uri | plain | string | Box uri. | |
version | plain | object | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url, upload_date, length and destination_path. | |
schema | plain | string | Box schema uri. | Yes |
Request Body
{
"updated": "2018-07-02 13:36:30.348041",
"automatic_updates": "off",
"requirements": [
"linux",
"new_requirement"
],
"description": "Test Started for our showcase",
"name": "Test Starter Box",
"created": "2018-12-31 11:20:27.349315",
"deleted": null,
"variables": [
{
"required": false,
"type": "Text",
"name": "variable_name",
"value": "New value",
"visibility": "public"
}
],
"uri": "/services/boxes/60cef61c-73dc-41d9-a32f-70f49a509c66",
"visibility": "workspace",
"id": "60cef61c-73dc-41d9-a32f-70f49a509c66",
"members": [],
"owner": "operation",
"organization": "elasticbox",
"events": {},
"draft_from": "ca197de8-25e1-4e9b-9d45-c99a049249fc",
"schema": "http://elasticbox.net/schemas/boxes/script"
}
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 403 Forbidden
- 404 Not Found
Response Parameters
Parameter | Style | Type | Description |
---|---|---|---|
box_variables | plain | object | 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, value, visibility, required, etc. |
box_variables.added | plain | array | List of box variables added, each variable object contains the parameters: type, name, value, visibility, required, etc. |
box_variables.changed | plain | array | List of box variables changed, each variable object contains the parameters: type, name, value, visibility, required, etc. |
box_details | plain | object | Differences in the box details, the object contains a title and three lists: removed, added and changed. |
box_profile_properties | plain | object | 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. |
{
"changed": true,
"box_services": {
"removed": [],
"added": []
},
"box_events": [],
"box_variables": {
"title": "Modified Variables",
"removed": [],
"changed": [
[
{
"required": false,
"type": "Text",
"name": "variable_name",
"value": "New value",
"visibility": "public"
},
{
"required": false,
"type": "Text",
"name": "variable_name",
"value": "",
"visibility": "public"
}
]
],
"added": [],
"files_diff": []
},
"box_readme": [],
"box_details": {
"title": "Modified Box Details",
"removed": [],
"added": [],
"changed": [
{
"new": "linux, new_requirement",
"name": "Requirements",
"previous": "apache, linux"
}
]
},
"box_profile_properties": {
"removed": [],
"changed": [],
"added": [],
"files_diff": []
},
"box_services_variables": {
"removed": [],
"added": [],
"files_diff": []
}
}
Create and Launch a CloudFormation Box
Create a CloudFormation box with template
-
POST /services/boxes
Creates a box of the CloudFormation service type. See example create a CloudFormation. -
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. -
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. -
PUT /services/boxes/{box_id}
Updates the CloudFormation box with the template. See example create a CloudFormation, part 4.
Modify the CloudFormation Template
-
POST /services/blobs/upload/{file_name}
Creates a blob from modified template data. See example modify a CloudFormation. -
PUT /services/boxes/{box_id}
Updates the CloudFormation box. See example modify a CloudFormation, part 2.
Delete a CloudFormation Box
- DELETE /services/box/{box_id}
Removes the CloudFormation box from the boxes catalog.
Launch a CloudFormation Box
-
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. -
POST /services/instances
Creates a new instance of the CloudFormation box.
Update a CloudFormation Stack in Real-Time
-
POST /services/blobs/upload
Uploads the modified template data. See example update a CloudFormation. -
PUT /services/instances/{instance_id}
Updates the instance with the template changes. See example update a CloudFormation part 2. -
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.
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
Request Body
{
"owner": "operations",
"schema":"http://elasticbox.net/schemas/boxes/cloudformation",
"automatic_updates":"off",
"name":"Wordpress Starter CF",
"description":"Wordpress Started for our showcase"
}
Response
Response Body
{
"updated": "2019-01-02 10:57:43.782726",
"automatic_updates": "off",
"description": "Wordpress Started for our showcase",
"deleted": null,
"variables": [],
"visibility": "workspace",
"members": [],
"owner": "operations",
"id": "755a09cc-6407-44e2-9993-539c386ee559",
"requirements": [],
"name": "Wordpress Starter CF",
"created": "2019-01-02 10:57:43.782726",
"uri": "/services/boxes/755a09cc-6407-44e2-9993-539c386ee559",
"organization": "centurylink",
"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.
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
Response
Response 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"
}
}
}
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.
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
Request 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"
}
}
}
Response
Response Body
{
"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.
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
Request 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"
}
}
Response
Response Body
{
"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.
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
Request 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"
}
}
}
Response
Response Body
{
"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.
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
Request 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"
}
}
Response
Response Body
{
"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.
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
Request 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"
}
]
}
}
Response
Response Body
{
"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.
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
Request Body
{
"Resources" : {
"HelloBucket" : {
"Type" : "AWS::S3::Bucket"
}
}
}
Response
Response Body
{
"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.
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
Request Body
{
"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
}
Response
Response Body
{
"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.
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
Request Body
{
"id":"i-ywf1hu",
"method":"reconfigure"
}
Response
None.
Instances API
Manage and perform actions on instances.
Create or List Instances
Resource | 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
GET /services/instances
Gets instances that are accessible in the personal workspace of the authenticated user.
URL
Structure
[GET] /services/instances
Example
[GET] https://cam.ctl.io/services/instances
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
- None
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Bad Request
- 401 Unauthorized
Response Parameters
Parameter | Type | Description |
---|---|---|
box | string | Box unique identifier used to create the instance. |
lease | array | Schedules an instance with three parameters: |
created | string | Creation date. |
updated | string | Date of the last update. |
automatic_updates | string | One of these: major, minor, patch, off. Default off. |
members | array | List of members whom you shared the instance. |
owner | string | Instance owner. |
operation | string | Last operation, there are seven types of operations: deploy, shutdown , poweron , reinstall , reconfigure , terminate and terminate_service |
name | string | Instance name. |
service | object | Instance service. |
service.type | string | Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service. |
service.id | string | Service unique identifier. |
service.machines | array | List of service machines |
machine | object | Machine contained in the service machines list. |
machine.state | string | Machine state, there are three possible states: processing, done and unavailable. |
machine.name | string | Machine name. |
machine.workflow | array | List of workflow actions, where each workflow action object contains three parameters: box, event, and script. |
workflow.box | string | Workflow action box. |
workflow.event | string | Workflow action event. |
workflow.script | string | Workflow action script uri. |
tags | array | Instance tags. |
variables | array | List of instance variables, each variable object contains the parameters: type, name, value, visibility, required, etc.. |
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 | string | Instance uri. |
state | string | Instance state, there are three possible states: processing, done and unavailable |
bindings | array | List of instance bindings. |
binding | object | Binding contained in the bindings list, each binding object contains the parameters: instance and name. |
id | array | Instance unique identifier |
icon | string | Instance icon uri. |
schema | string | Instance schema uri. |
Response Body
[{
"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.
URL
Structure
[POST] /services/instances
Example
[POST] https://cam.ctl.io/services/instances
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
- None
Request Body Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
schema | string | Instance schema URI. | Yes |
owner | string | ID of the workspace where the instance is posted. | Yes |
box | Object | Box object with its id and a list of overridden variable objects at deployment time | Yes |
policy_box | Object | Box object with its id and a list of overridden variable objects at deployment time | Yes |
automatic_updates | string | One of these: major, minor, patch, off. Default off. | |
lease | array | Schedules an instance with two parameters: |
|
name | string | Instance name. | Yes |
instance_tags | array | List of tags defined at deployment time. |
Request Body
The next example its the request schedules the new instance.
{
"schema": "http://elasticbox.net/schemas/deploy-instance-request",
"owner": "operations",
"name": "TestServe",
"box": {
"id": "4f996250-a420-4e44-8e97-4af86328148f",
"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": "11c8882e-3888-4bdd-bd2d-b92766a423c7",
"variables": []
}
}
Response
Normal Response Codes
- 202 OK
Common Error Response Codes
- 400 Invalid Data
Response Parameters
Parameter | Type | Description |
---|---|---|
lease | array | If scheduled, this object displays these parameters for the instance: |
bindings | array | List of instance bindings. |
binding | object | Binding contained in the bindings list, each binding object contains the parameters: instance and name. |
updated | string | Date of the last update. |
name | string | Instance name. |
service | Object | Instance service. |
service.type | string | Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service. |
service.id | string | Service type. |
service.machines | array | List of service machines. |
machine | object | Machine contained in the service machines list. |
machine.state | string | Machine state, there are three possible states: processing , done and unavailable. |
machine.name | string | Machine name. |
machine.workflow | array | List of workflow actions, where each workflow action object contains three parameters: box, event, and script. |
workflow.box | string | Workflow action box. |
workflow.event | string | Workflow action event. |
workflow.script | string | Workflow action script uri. |
tags | array | Instance tags. |
variables | array | List of instance variables, each variable object contains the parameters: type, name, value, visibility, required, etc.. |
created | string | Creation date. |
boxes | array | List of boxes |
box.visibility | string | 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: |
box.organization | string | Organization to which the box belongs. |
box.updated | string | Date of the last update. |
box.description | string | Box description. |
box.service | string | 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, value, visibility, required, etc.. |
box.created | string | Creation date. |
box.uri | string | Box uri. |
box.id | array | Box unique identifier. |
box.schema | string | Box schema uri. |
box.members | array | List of Box members. |
box.owner | string | Box owner. |
box.bindings | array | List of Box bindings. |
box.binding | object | Binding contained in the bindings list, each binding have a box and a name. |
box.icon | string | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url , upload_date , length and destination_path. |
box.name | string | Box name. |
uri | string | instance uri. |
state | string | Instance state, there are three possible states: processing , done and unavailable |
members | array | Instance members. |
owner | string | Instance owner. |
operation | string | Last operation, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure , terminate and terminate_service |
icon | string | Instance icon uri. |
id | array | Instance unique identifier. |
schema | string | Instance schema uri. |
policy_box | object | specific deployment policy for a provider |
policy_box.provider_id | string | provider id |
policy_box.automatic_updates | string | One of these: mayor, minor, patch, off |
policy_box.name | string | 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 | string | Deployment box policy id |
policy_box.schema | string | Deployment box policy schema |
policy_box.members | array | List of members sharing the deployment policy box |
policy_box.owner | string | Deployment box policy owner |
policy_box.readme | object | Readme file for the Deployment policy box |
Response Body
{
"automatic_updates": "off",
"variables": [
{
"required": true,
"type": "Text",
"name": "variable_name",
"value": "overridden variable value at deployment time",
"visibility": "public"
}
],
"automatic_reconfiguration": true,
"owner": "operations",
"pricing_history": [
{
"pricing_info": {
"estimated_monthly": 3168000,
"provider_type": "Amazon Web Services",
"hourly_price": 4400,
"factor": 100000
},
"from": "2018-12-26 15:18:26.524612"
}
],
"bindings": [],
"operation": {
"event": "deploy",
"workspace": "operations",
"created": "2018-12-26 15:18:26.524612"
},
"service": {
"type": "Linux Compute",
"id": "eb-l2gmi",
"machines": []
},
"id": "i-b1qtkz",
"is_deploy_only": true,
"state": "processing",
"schema": "http://elasticbox.net/schemas/instance",
"updated": "2018-12-26 15:18:26.532799",
"tags": [],
"deleted": null,
"boxes": [
{
"updated": "2018-12-26 15:17:00.128048",
"automatic_updates": "off",
"requirements": [],
"name": "php-server",
"created": "2018-12-11 14:29:56.791167",
"deleted": null,
"variables": [
{
"required": false,
"type": "Text",
"name": "variable_name",
"value": "value",
"visibility": "public"
}
],
"visibility": "workspace",
"id": "4f996250-a420-4e44-8e97-4af86328148f",
"members": [],
"owner": "operations",
"organization": "centurylink",
"events": {
"pre_install": {
"url": "/services/blobs/download/5c0fcb8cc9a9d120195a3f7a/pre_install",
"length": 39,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
},
"configure": {
"url": "/services/blobs/download/5c0fca3dc9a9d120195a3f71/configure",
"length": 23,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"draft_from": "f0023f62-8e43-41d6-a248-691f092d6287",
"schema": "http://elasticbox.net/schemas/boxes/script"
}
],
"members": [],
"box": "4f996250-a420-4e44-8e97-4af86328148f",
"name": "TestServe",
"created": "2018-12-26 15:18:26.532799",
"policy_box": {
"profile": {
"subnet": "us-east-1a",
"security_groups": [
"Automatic"
],
"pricing_info": {
"estimated_monthly": 3168000,
"provider_type": "Amazon Web Services",
"hourly_price": 4400,
"factor": 100000
},
"image": "Linux Compute",
"instances": 1,
"keypair": "None",
"cloud": "EC2",
"volumes": [],
"flavor": "m1.small",
"schema": "http://elasticbox.net/schemas/aws/ec2/profile",
"managed_os": false,
"location": "us-east-1"
},
"provider_id": "0669730b-6f01-421b-8a5e-597bca20c1bf",
"automatic_updates": "off",
"name": "default-small-us-east-1",
"created": "2018-12-11 13:53:56.512649",
"deleted": null,
"variables": [],
"updated": "2018-12-11 13:53:56.512649",
"visibility": "workspace",
"readme": {
"url": "#application-lifecycle-management-services/resources/default-box-overview",
"upload_date": "2018-12-11 13:53:56.512131",
"length": 1307,
"content_type": "text/x-markdown"
},
"members": [],
"claims": [
"small",
"linux"
],
"owner": "operations",
"organization": "centurylink",
"id": "11c8882e-3888-4bdd-bd2d-b92766a423c7",
"schema": "http://elasticbox.net/schemas/boxes/policy"
},
"uri": "/services/instances/i-b1qtkz"
}
POST /services/instances
Register an unregistered instance: notice that it's the same endpoint to create a new instance.
URL
Structure
[POST] /services/instances
Example
[POST] https://cam.ctl.io/services/instances
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
- None
Request Body Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
schema | string | Register Instance Request schema URI. | Yes |
owner | string | ID of the workspace where the instance is imported. | Yes |
name | string | Instance name to register. | Yes |
description | string | Instance description to register. | |
unregistered_id | string | Instance unique identifier | Yes |
linux_username | string | Linux user to install agent | Yes |
private_key | string | Linux key to install agent | Yes |
windows_username | string | Windows username to install agent | Yes |
windows_password | string | Windows password to install agent | Yes |
instance_tags | array | List of tags defined at deployment time. | |
automatic_updates | string | One of these: major, minor, patch, off. Default off. | |
lease | array | Schedules an instance with two parameters: |
Request 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:
{
"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
Normal Response Codes
- 202 OK
Common Error Response Codes
- 400 Invalid Data
Response Parameters
Parameter | Type | Description |
---|---|---|
lease | array | If scheduled, this object displays these parameters for the instance: |
bindings | array | List of instance bindings. |
binding | object | Binding contained in the bindings list, each binding object contains the parameters: instance and name. |
updated | string | Date of the last update. |
name | string | Instance name. |
service | Object | Instance service. |
service.type | string | Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service. |
service.id | string | Service type. |
service.machines | array | List of service machines. |
machine | object | Machine contained in the service machines list. |
machine.state | string | Machine state, there are three possible states: processing , done and unavailable. |
machine.name | string | Machine name. |
machine.workflow | array | List of workflow actions, where each workflow action object contains three parameters: box, event, and script. |
workflow.box | string | Workflow action box. |
workflow.event | string | Workflow action event. |
workflow.script | string | Workflow action script uri. |
tags | array | Instance tags. |
variables | array | List of instance variables, each variable object contains the parameters: type, name, value, visibility, required, etc.. |
created | string | Creation date. |
boxes | array | List of boxes |
box.visibility | string | 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: |
box.organization | string | Organization to which the box belongs. |
box.updated | string | Date of the last update. |
box.description | string | Box description. |
box.service | string | 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, value, visibility, required, etc.. |
box.created | string | Creation date. |
box.uri | string | Box uri. |
box.id | array | Box unique identifier. |
box.schema | string | Box schema uri. |
box.members | array | List of Box members. |
box.owner | string | Box owner. |
box.bindings | array | List of Box bindings. |
box.binding | object | Binding contained in the bindings list, each binding have a box and a name. |
box.icon | string | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url , upload_date , length and destination_path. |
box.name | string | Box name. |
uri | string | instance uri. |
state | string | Instance state, there are three possible states: processing , done and unavailable |
members | array | Instance members. |
owner | string | Instance owner. |
operation | string | Last operation, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure , terminate and terminate_service |
icon | string | Instance icon uri. |
id | array | Instance unique identifier. |
schema | string | Instance schema uri. |
policy_box | object | specific deployment policy for a provider |
policy_box.provider_id | string | provider id |
policy_box.automatic_updates | string | One of them: mayor, minor, patch, off |
policy_box.name | string | 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 | string | Deployment box policy id |
policy_box.schema | string | Deployment box policy schema |
policy_box.members | array | List of members sharing the deployment policy box |
policy_box.owner | string | Deployment box policy owner |
policy_box.readme | object | Readme file for the Deployment policy box |
Response Body
{
"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.
URL
Structure
[GET] /services/instances/{instance_id}
Example
[GET] https://cam.ctl.io/services/instances/i-b1qtkz
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Invalid Data
- 403 Forbidden
- 404 Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
bindings | array | List of instance bindings. |
binding | object | Binding contained in the bindings list, each binding object contains the parameters: instance and name. |
updated | string | Date of the last update. |
name | string | Instance name. |
service | object | Instance service. |
service.type | string | Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service. |
service.id | string | Service type. |
service.machines | array | List of service machines |
machine | object | Machine contained in the service machines list. |
machine.state | string | Machine state, there are three possible states: processing , done and unavailable. |
machine.name | string | Machine name. |
machine.workflow | array | List of workflow actions, where each workflow action object contains three parameters: box, event, and script. |
workflow.box | string | Workflow action box. |
workflow.event | string | Workflow action event. |
workflow.script | string | Workflow action script uri. |
tags | array | Instance tags. |
variables | array | List of instance variables, each variable object contains the parameters: type, name, value, visibility, required, etc.. |
created | string | Creation date. |
boxes | array | List of boxes |
box.visibility | string | 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: |
box.organization | string | Organization to which the box belongs. |
box.updated | string | Date of the last update. |
box.description | string | Box description. |
box.service | string | 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, value, visibility, required, etc.. |
box.created | string | Creation date. |
box.uri | string | Box uri. |
box.id | array | Box unique identifier. |
box.schema | string | Box schema uri. |
box.members | array | List of Box members. |
box.owner | string | Box owner. |
box.bindings | array | List of Box bindings. |
box.binding | object | Binding contained in the bindings list, each binding have a box and a name. |
box.icon | string | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url , upload_date , length and destination_path. |
box.name | string | Box name. |
policy_box | object | specific deployment policy for a provider |
policy_box.provider_id | string | provider id |
policy_box.automatic_updates | string | One of them: mayor, minor, patch, off |
policy_box.name | string | 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 | string | Deployment box policy id |
policy_box.schema | string | Deployment box policy schema |
policy_box.members | array | List of members sharing the deployment policy box |
policy_box.owner | string | Deployment box policy owner |
policy_box.readme | object | Readme file for the Deployment policy box |
uri | string | instance uri. |
state | string | Instance state, there are three possible states: processing , done and unavailable |
members | array | Instance members. |
owner | string | Instance owner. |
operation | string | Last operation, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure , terminate and terminate_service |
icon | string | Instance icon uri. |
id | array | Instance unique identifier. |
schema | string | Instance schema uri. |
Response Body
{
"automatic_updates": "off",
"variables": [
{
"required": true,
"type": "Text",
"name": "variable_name",
"value": "overridden variable value at deployment time",
"visibility": "public"
}
],
"automatic_reconfiguration": true,
"owner": "operations",
"pricing_history": [
{
"pricing_info": {
"estimated_monthly": 3168000,
"provider_type": "Amazon Web Services",
"hourly_price": 4400,
"factor": 100000
},
"from": "2018-12-26 15:18:26.524612"
}
],
"operation": {
"event": "deploy",
"workspace": "operations",
"created": "2018-12-26 15:18:27.567661"
},
"bindings": [],
"service": {
"type": "Linux Compute",
"id": "eb-l2gmi",
"machines": [
{
"state": "done",
"name": "testserve-eb-l2gmi-1",
"workflow": []
}
]
},
"id": "i-b1qtkz",
"is_deploy_only": true,
"state": "done",
"schema": "http://elasticbox.net/schemas/instance",
"updated": "2018-12-26 15:21:56.516934",
"tags": [],
"deleted": null,
"boxes": [
{
"updated": "2018-12-26 15:17:00.128048",
"automatic_updates": "off",
"requirements": [],
"name": "php-server",
"created": "2018-12-11 14:29:56.791167",
"deleted": null,
"variables": [
{
"required": false,
"type": "Text",
"name": "variable_name",
"value": "value",
"visibility": "public"
}
],
"visibility": "workspace",
"id": "4f996250-a420-4e44-8e97-4af86328148f",
"members": [],
"owner": "operations",
"organization": "centurylink",
"events": {
"pre_install": {
"url": "/services/blobs/download/5c0fcb8cc9a9d120195a3f7a/pre_install",
"length": 39,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
},
"configure": {
"url": "/services/blobs/download/5c0fca3dc9a9d120195a3f71/configure",
"length": 23,
"destination_path": "scripts",
"content_type": "text/x-shellscript"
}
},
"draft_from": "f0023f62-8e43-41d6-a248-691f092d6287",
"schema": "http://elasticbox.net/schemas/boxes/script"
}
],
"members": [],
"box": "4f996250-a420-4e44-8e97-4af86328148f",
"name": "TestServe",
"created": "2018-12-26 15:18:26.532799",
"policy_box": {
"profile": {
"subnet": "us-east-1a",
"security_groups": [
"Automatic"
],
"pricing_info": {
"estimated_monthly": 3168000,
"provider_type": "Amazon Web Services",
"hourly_price": 4400,
"factor": 100000
},
"image": "Linux Compute",
"instances": 1,
"keypair": "None",
"location": "us-east-1",
"volumes": [],
"cloud": "EC2",
"flavor": "m1.small",
"managed_os": false,
"schema": "http://elasticbox.net/schemas/aws/ec2/profile"
},
"provider_id": "0669730b-6f01-421b-8a5e-597bca20c1bf",
"automatic_updates": "off",
"name": "default-small-us-east-1",
"created": "2018-12-11 13:53:56.512649",
"deleted": null,
"variables": [],
"updated": "2018-12-11 13:53:56.512649",
"visibility": "workspace",
"readme": {
"url": "#application-lifecycle-management-services/resources/default-box-overview",
"upload_date": "2018-12-11 13:53:56.512131",
"length": 1307,
"content_type": "text/x-markdown"
},
"members": [],
"claims": [
"small",
"linux"
],
"owner": "operations",
"organization": "centurylink",
"id": "11c8882e-3888-4bdd-bd2d-b92766a423c7",
"schema": "http://elasticbox.net/schemas/boxes/policy"
},
"uri": "/services/instances/i-b1qtkz"
}
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.
URL
Structure
[PUT] /services/instances/{instance_id}
Example
[PUT] https://cam.ctl.io/services/instances/eb-bbhzh
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Request Body Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
bindings | array | List of instance bindings. | |
binding | object | Binding contained in the bindings list, each binding object contains the parameters: instance and name. | |
updated | string | Date of the last update. | |
name | string | Instance name. | Yes |
service | object | Instance service. | Yes |
service.type | string | Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service. | Yes |
service.id | string | Service type. | Yes |
service.machines | array | List of service machines | |
machine | object | Machine contained in the service machines list. | |
machine.state | string | Machine state, there are three possible states: processing , done and unavailable. | |
machine.name | string | Machine name. | |
machine.workflow | array | List of workflow actions, where each workflow action object contains three parameters: box, event, and script. | |
workflow.box | string | Workflow action box. | |
workflow.event | string | Workflow action event. | |
workflow.script | string | Workflow action script uri. | |
tags | array | Instance tags. | |
variables | array | List of instance variables, each variable object contains the parameters: type, name, value, visibility, required, etc.. | |
created | string | Creation date. | |
boxes | array | List of boxes | Yes |
box.visibility | string | 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: |
|
box.organization | string | Organization to which the box belongs. | Yes |
box.updated | string | Date of the last update. | |
box.description | string | Box description. | |
box.service | string | Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service. | Yes |
box.tags | array | Box tags. | |
box.variables | array | List of box variables, each variable object contains the parameters: type, name, value, visibility, required, etc.. | |
box.created | string | Creation date. | |
box.uri | string | Box uri. | |
box.id | array | Box unique identifier. | Yes |
box.schema | string | Box schema uri. | Yes |
box.members | array | List of Box members. | |
box.owner | string | Box owner. | Yes |
box.bindings | array | List of Box bindings. | |
box.binding | object | Binding contained in the bindings list, each binding have a box and a name. | |
box.icon | string | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url , upload_date , length and destination_path. | |
box.name | string | Box name. | Yes |
policy_box | object | specific deployment policy for a provider | |
policy_box.provider_id | string | provider id | |
policy_box.automatic_updates | string | One of them: mayor, minor, patch, off | |
policy_box.name | string | 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 | string | Deployment box policy id | |
policy_box.schema | string | Deployment box policy schema | |
policy_box.members | array | List of members sharing the deployment policy box | |
policy_box.owner | string | Deployment box policy owner | |
policy_box.readme | object | Readme file for the Deployment policy box | |
uri | string | instance uri. | |
state | string | Instance state, there are three possible states: processing , done and unavailable | Yes |
members | array | Instance members. | |
owner | string | Instance owner. | Yes |
operation | string | Last operation, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure , terminate and terminate_service | Yes |
icon | string | Instance icon uri. | |
id | array | Instance unique identifier. | Yes |
schema | string | Instance schema uri. | Yes |
lease | array | Schedules an instance with two parameters: |
Request Body
{
"box": "231dadb5-c3a5-4c33-af8e-fc315b0d11eb",
"updated": "2019-01-18 15:19:59.199831",
"automatic_updates": "off",
"name": "TestServeONE",
"service": {
"type": "Linux Compute",
"id": "eb-n1y4u",
"machines": [
{
"state": "done",
"name": "testserveone-eb-n1y4u-1",
"workflow": []
}
]
},
"policy_box": {
"profile": {
"subnet": "us-east-1a",
"cloud": "EC2",
"image": "Linux Compute",
"instances": 1,
"keypair": "None",
"location": "us-east-1",
"flavor": "m1.small",
"schema": "http://elasticbox.net/schemas/aws/ec2/profile"
},
"provider_id": "d583d52b-1f6b-436e-82f3-06fdaf15a788",
"automatic_updates": "off",
"name": "default-small-us-east-1",
"created": "2019-01-18 15:11:27.695987",
"deleted": null,
"variables": [],
"updated": "2019-01-18 15:11:27.695987",
"visibility": "workspace",
"owner": "workspace",
"members": [],
"claims": [
"small",
"linux"
],
"organization": "public",
"id": "aeff44ad-adfb-4b57-b644-6ca0bfba2ab2",
"schema": "http://elasticbox.net/schemas/boxes/policy"
},
"created": "2019-01-18 15:16:19.306559",
"uri": "/services/instances/i-gsnjqi",
"state": "done",
"boxes": [
{
"schema": "http://elasticbox.net/schemas/boxes/script",
"updated": "2019-01-03 11:02:09.324450",
"automatic_updates": "off",
"requirements": [
"linux"
],
"description": "Linux Machine with no software preinstalled",
"created": "2019-01-03 11:02:09.324450",
"deleted": null,
"variables": [],
"visibility": "public",
"events": {},
"version": {
"box": "231dadb5-c3a5-4c33-af8e-fc315b0d11eb",
"number": {
"major": 1,
"minor": 0,
"patch": 0
},
"workspace": "elasticbox",
"description": "Initial ElasticBox Version"
},
"friendly_id": "linux-compute",
"members": [],
"owner": "elasticbox",
"organization": "public",
"icon": "images/platform/linux.png",
"id": "1ee9af93-f9f2-4e65-9cba-71f1f6fbab61",
"name": "Linux Compute"
}
],
"schema": "http://elasticbox.net/schemas/instance",
"owner": "default",
"variables": [
{
"required": true,
"type": "Text",
"name": "variable_name",
"value": "overridden variable value at deployment time",
"visibility": "public"
}
],
"operation": {
"event": "deploy",
"workspace": "default",
"created": "2019-01-18 15:16:19.479458"
},
"id": "i-gsnjqi",
"icon": "images/platform/linux.png"
}
Response
Normal Response Codes
- 200 OK
- 202 OK
Common Error Response Codes
- 400 Invalid Data
- 403 Forbidden
- 404 Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
bindings | array | List of instance bindings. |
binding | object | Binding contained in the bindings list, each binding object contains the parameters: instance and name. |
updated | string | Date of the last update. |
name | string | Instance name. |
service | Object | Instance service. |
service.type | string | Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service. |
service.id | string | Service type. |
service.machines | array | List of service machines. |
machine | object | Machine contained in the service machines list. |
machine.state | string | Machine state, there are three possible states: processing , done and unavailable. |
machine.name | string | Machine name. |
machine.workflow | array | List of workflow actions, where each workflow action object contains three parameters: box, event, and script. |
workflow.box | string | Workflow action box. |
workflow.event | string | Workflow action event. |
workflow.script | string | Workflow action script uri. |
tags | array | Instance tags. |
variables | array | List of instance variables, each variable object contains the parameters: type, name, value, visibility, required, etc.. |
created | string | Creation date. |
boxes | array | List of boxes |
box.visibility | string | 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: |
box.organization | string | Organization to which the box belongs. |
box.updated | string | Date of the last update. |
box.description | string | Box description. |
box.service | string | 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, value, visibility, required, etc.. |
box.created | string | Creation date. |
box.uri | string | Box uri. |
box.id | array | Box unique identifier. |
box.schema | string | Box schema uri. |
box.members | array | List of Box members. |
box.owner | string | Box owner. |
box.bindings | array | List of Box bindings. |
box.binding | object | Binding contained in the bindings list, each binding have a box and a name. |
box.icon | string | 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 | object | Event contained in one of the event lists, each event object contains the parameters: url , upload_date , length and destination_path. |
box.name | string | Box name. |
policy_box | object | specific deployment policy for a provider |
policy_box.provider_id | string | provider id |
policy_box.automatic_updates | string | One of them: mayor, minor, patch, off |
policy_box.name | string | 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 | string | Deployment box policy id |
policy_box.schema | string | Deployment box policy schema |
policy_box.members | array | List of members sharing the deployment policy box |
policy_box.owner | string | Deployment box policy owner |
policy_box.readme | object | Readme file for the Deployment policy box |
uri | string | instance uri. |
state | string | Instance state, there are three possible states: processing , done and unavailable |
members | array | Instance members. |
owner | string | Instance owner. |
operation | string | Last operation, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure , terminate and terminate_service |
icon | string | Instance icon uri. |
id | array | Instance unique identifier. |
schema | string | Instance schema uri. |
lease | array | Schedules an instance with two parameters: |
Response Body
{
"automatic_updates": "off",
"icon_metadata": {
"image": "images/platform/linux.png",
"border": "#D0D4D8",
"fill": "#FFFFFF"
},
"variables": [
{
"required": true,
"type": "Text",
"name": "variable_name",
"value": "overridden variable value at deployment time",
"visibility": "public"
}
],
"automatic_reconfiguration": true,
"owner": "default",
"bindings": [],
"operation": {
"event": "deploy",
"workspace": "default",
"created": "2019-01-18 15:16:19.479458"
},
"service": {
"type": "Linux Compute",
"id": "eb-n1y4u",
"machines": [
{
"state": "done",
"name": "testserveone-eb-n1y4u-1",
"workflow": []
}
]
},
"id": "i-gsnjqi",
"is_deploy_only": true,
"state": "done",
"schema": "http://elasticbox.net/schemas/instance",
"updated": "2019-01-18 17:11:59.169299",
"tags": [],
"deleted": null,
"boxes": [
{
"updated": "2019-01-03 11:02:09.324450",
"automatic_updates": "off",
"description": "Linux Machine with no software preinstalled",
"deleted": null,
"variables": [],
"visibility": "public",
"friendly_id": "linux-compute",
"members": [],
"owner": "elasticbox",
"id": "1ee9af93-f9f2-4e65-9cba-71f1f6fbab61",
"icon": "images/platform/linux.png",
"requirements": [
"linux"
],
"name": "Linux Compute",
"created": "2019-01-03 11:02:09.324450",
"version": {
"box": "231dadb5-c3a5-4c33-af8e-fc315b0d11eb",
"number": {
"major": 1,
"minor": 0,
"patch": 0
},
"workspace": "elasticbox",
"description": "Initial ElasticBox Version"
},
"organization": "public",
"events": {},
"schema": "http://elasticbox.net/schemas/boxes/script"
}
],
"members": [],
"icon": "/icons/instances/i-gsnjqi",
"box": "231dadb5-c3a5-4c33-af8e-fc315b0d11eb",
"name": "TestServeONE",
"created": "2019-01-18 15:16:19.306559",
"policy_box": {
"profile": {
"subnet": "us-east-1a",
"cloud": "EC2",
"image": "Linux Compute",
"location": "us-east-1",
"instances": 1,
"keypair": "None",
"managed_os": false,
"volumes": [],
"flavor": "m1.small",
"security_groups": [
"Automatic"
],
"schema": "http://elasticbox.net/schemas/aws/ec2/profile"
},
"provider_id": "d583d52b-1f6b-436e-82f3-06fdaf15a788",
"automatic_updates": "off",
"name": "default-small-us-east-1",
"created": "2019-01-18 15:11:27.695987",
"deleted": null,
"variables": [],
"updated": "2019-01-18 15:11:27.695987",
"visibility": "workspace",
"readme": {
"url": "#application-lifecycle-management-services/resources/default-box-overview",
"upload_date": "2019-01-18 15:11:27.695361",
"length": 1307,
"content_type": "text/x-markdown"
},
"members": [],
"claims": [
"small",
"linux"
],
"owner": "default",
"organization": "public",
"id": "aeff44ad-adfb-4b57-b644-6ca0bfba2ab2",
"schema": "http://elasticbox.net/schemas/boxes/policy"
},
"uri": "/services/instances/i-gsnjqi"
}
DELETE /services/instances/{instance_id}
Terminates, force-terminates, or deletes an existing instance based on its instance ID.
URL
Structure
[DELETE] /services/instances/{instance_id}?operation=value
Example
[DELETE] https://cam.ctl.io/services/instances/eb-bbhzh?operation=force_terminate
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
operation | string | Operation type must be one of the following values: terminate, force_terminate and delete | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 400 Invalid Data
- 403 Forbidden
- 404 Not Found
- 409 Operation Conflict
GET /services/instances/{instance_id}/service
Gets the service on the instance given its instance ID.
URL
Structure
[GET] /services/instances/{instance_id}/service
Example
[GET] https://cam.ctl.io/services/instances/i-b1qtkz/service
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 403 Forbidden
- 404 Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
profile | object | Service profile. |
profile.subnet | string | Profile subnet. |
profile.image | string | Profile image. |
profile.keypair | string | Profile keypair. |
profile.location | string | Profile location. |
profile.security_group | string | Profile secruty group. |
profile.flavor | string | Profile flavor. |
profile.autoscalable | boolean | Profile autoscalable. |
profile.cloud | boolean | Cloud type. |
profile.schema | string | Profile schema uri. |
provider_id | string | Profile provider unique identifier. |
created | string | Creation date. |
tags | array | Service tags. |
state | string | Service state, there are three possible states: processing , done and unavailable |
token | string | Service token. |
operation | string | Service last operation, there are seven types of operations: deploy, shutdown, poweron, reinstall, reconfigure, terminate, and terminate_service. |
icon | string | Service icon url. |
type | string | Instance type. |
id | string | Instance unique identifier. |
machines | array | List of service machines. |
machine.token | string | Machine token. |
machine.name | string | 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 | string | Machine state, there are three possible states: processing , done and unavailable. |
machine.schema | array | Machine schema uri. |
schema | string | Service schema uri. |
organization | string | The name of the organization that owns this service. |
deleted | string | Null when the instance is available. |
Response Body
{
"profile": {
"subnet": "us-east-1a",
"pricing_info": {
"estimated_monthly": 3168000,
"factor": 100000,
"hourly_price": 4400,
"provider_type": "Amazon Web Services"
},
"image": "ami-7c807d14",
"managed_os": false,
"instances": 1,
"keypair": "None",
"location": "us-east-1",
"volumes": [],
"cloud": "EC2",
"flavor": "m1.small",
"security_groups": [
"Automatic"
],
"schema": "http://elasticbox.net/schemas/aws/ec2/profile"
},
"schema": "http://elasticbox.net/schemas/service",
"provider_id": "0669730b-6f01-421b-8a5e-597bca20c1bf",
"tags": [],
"deleted": null,
"variables": [],
"created": "2018-12-26 15:18:26.651731",
"state_history": [
{
"started": "2018-12-26 15:19:12.346533",
"state": "up",
"completed": "2018-12-26 15:30:59.280770"
},
{
"started": "2018-12-26 15:30:59.280770",
"state": "down",
"completed": "2018-12-26 15:31:27.771582"
},
{
"started": "2018-12-26 15:31:27.771608",
"state": "up"
}
],
"updated": "2018-12-26 15:37:03.927659",
"token": "4b108401-680f-4c12-b972-3c481a852c73",
"state": "done",
"clc_alias": "86C7",
"organization": "centurylink",
"operation": "poweron",
"type": "Linux Compute",
"id": "eb-l2gmi",
"machines": [
{
"last_agent_ping": "2018-12-26 15:33:07.907863",
"name": "testserve-eb-l2gmi-1",
"hostname": "ec2-52-90-5-208.compute-1.amazonaws.com",
"token": "b40e24eb-dc72-4be5-b044-3f0015a28091",
"support_id": "AWSUSE110715",
"state": "done",
"address": {
"public": "54.208.195.172",
"private": "10.45.133.57"
},
"schema": "http://elasticbox.net/schemas/aws/service-machine",
"external_id": "i-0fbf9349a5ea5cd36",
"agent_version": "6.13"
}
],
"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.
URL
Structure
[GET] /services/instances/{instance_id}/activity
Example
[GET] https://cam.ctl.io/services/instances/i-b1qtkz/activity
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 403 Forbidden
- 404 Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
* box | string | Box name. |
username | string | User who performed the activity. |
* machine | string | Machine. |
level | string | Activity type. |
text | string | Activity description. |
created | string | Activity creation date. |
* event | string | Activity event. |
* Note: Only showed when the instance activity is related with the parameter.
Response Body
[
{
"text": "Deploying instance.",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:18:27.582649",
"level": "start"
},
{
"text": "Created security group eb-l2gmi.",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:18:28.270143",
"level": "add"
},
{
"text": "Automatically selected image amzn-ami-pv-2014.03.2.x86_64-ebs.",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:18:29.952413",
"level": "info"
},
{
"text": "Create in Progress for eb-l2gmi (AWS::CloudFormation::Stack): User Initiated.",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:18:30.693042",
"level": "info"
},
{
"text": "Create in Progress for testserveebl2gmi1Machine (AWS::EC2::Instance).",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:18:40.934764",
"level": "info"
},
{
"text": "Create in Progress for testserveebl2gmi1Machine (AWS::EC2::Instance): Resource creation Initiated.",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:18:40.945462",
"level": "info"
},
{
"text": "Create Complete for testserveebl2gmi1Machine (AWS::EC2::Instance).",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:19:11.677807",
"level": "info"
},
{
"text": "Create Complete for eb-l2gmi (AWS::CloudFormation::Stack).",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:19:11.687805",
"level": "info"
},
{
"text": "Waiting to install ElasticBox agent in machine testserve-eb-l2gmi-1.",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:19:12.339171",
"level": "waiting"
},
{
"box": "",
"created": "2018-12-26 15:21:52.584981",
"text": "Executing pre_install:php-server in machine testserve-eb-l2gmi-1.",
"level": "install",
"exit_code": 0,
"machine": "testserve-eb-l2gmi-1",
"finished": "2018-12-26 15:21:53.200000",
"request_id": "4a0c69bc-9164-4f51-b313-d2ad46f50443",
"event": "pre_install"
},
{
"box": "",
"created": "2018-12-26 15:21:53.592944",
"text": "Executing configure:php-server in machine testserve-eb-l2gmi-1.",
"level": "configure",
"exit_code": 0,
"machine": "testserve-eb-l2gmi-1",
"finished": "2018-12-26 15:21:56.190000",
"request_id": "01e52bb8-a6ba-4f36-8d52-056975fc2e34",
"event": "configure"
},
{
"text": "Machine testserve-eb-l2gmi-1 successfully deployed.",
"request_id": "9232da27-2106-46cd-972d-c7014f4ece04",
"created": "2018-12-26 15:21:56.470664",
"level": "success"
},
{
"text": "Instance successfully deployed.",
"request_id": "9232da27-2106-46cd-972d-c7014f4ece04",
"created": "2018-12-26 15:21:56.483589",
"level": "success"
},
{
"text": "Shutting-down instance.",
"request_id": "0af456dd-86d9-49fd-8ff8-16e3017775a8",
"created": "2018-12-26 15:29:56.584842",
"level": "stop"
},
{
"text": "Machine testserve-eb-l2gmi-1 successfully stopped.",
"request_id": "36c4a9f6-78f2-44dc-af3f-2445017571e3",
"created": "2018-12-26 15:29:57.716319",
"level": "success"
},
{
"text": "Instance successfully stopped.",
"request_id": "36c4a9f6-78f2-44dc-af3f-2445017571e3",
"created": "2018-12-26 15:29:57.727837",
"level": "success"
},
{
"text": "Shutting-down service eb-l2gmi.",
"request_id": "615759d1-1461-44b6-96b8-ad4e9671271a",
"created": "2018-12-26 15:29:57.825175",
"level": "stop"
},
{
"text": "Waiting for shutting-down machines testserve-eb-l2gmi-1.",
"request_id": "615759d1-1461-44b6-96b8-ad4e9671271a",
"created": "2018-12-26 15:29:58.571231",
"level": "waiting"
},
{
"text": "Service eb-l2gmi successfully shutdown.",
"request_id": "615759d1-1461-44b6-96b8-ad4e9671271a",
"created": "2018-12-26 15:30:59.290583",
"level": "success"
},
{
"text": "Powering-on instance.",
"request_id": "5d48b218-330b-42bd-b3b0-0349a29c3c58",
"created": "2018-12-26 15:31:27.556072",
"level": "start"
},
{
"text": "Powering-on service eb-l2gmi.",
"request_id": "5d48b218-330b-42bd-b3b0-0349a29c3c58",
"created": "2018-12-26 15:31:27.603268",
"level": "start"
},
{
"text": "Booting machine testserve-eb-l2gmi-1.",
"request_id": "5d48b218-330b-42bd-b3b0-0349a29c3c58",
"created": "2018-12-26 15:31:27.786126",
"level": "info"
},
{
"text": "Waiting to install ElasticBox agent in machine testserve-eb-l2gmi-1.",
"request_id": "5d48b218-330b-42bd-b3b0-0349a29c3c58",
"created": "2018-12-26 15:31:28.176402",
"level": "waiting"
},
{
"box": "",
"created": "2018-12-26 15:33:03.801318",
"text": "Executing configure:php-server in machine testserve-eb-l2gmi-1.",
"level": "configure",
"exit_code": 0,
"machine": "testserve-eb-l2gmi-1",
"finished": "2018-12-26 15:33:06.440000",
"request_id": "7d39719d-236e-4277-bd0f-0c0ca21a941c",
"event": "configure"
},
{
"text": "Machine testserve-eb-l2gmi-1 successfully powered-on.",
"request_id": "78d61086-0fdc-4a3a-84c7-2848c88d0bed",
"created": "2018-12-26 15:33:06.706192",
"level": "success"
},
{
"text": "Instance successfully powered-on.",
"request_id": "78d61086-0fdc-4a3a-84c7-2848c88d0bed",
"created": "2018-12-26 15:33:06.716120",
"level": "success"
},
{
"text": "Reinstalling instance.",
"request_id": "162fc44b-c2a0-4873-a42e-0778d4f628ea",
"created": "2018-12-26 15:34:37.732658",
"level": "install"
},
{
"box": "",
"created": "2018-12-26 15:34:39.306274",
"text": "Executing pre_install:php-server in machine testserve-eb-l2gmi-1.",
"level": "install",
"exit_code": 0,
"machine": "testserve-eb-l2gmi-1",
"finished": "2018-12-26 15:34:41.870000",
"request_id": "31be6340-2a11-4cad-9643-8082f44515ac",
"event": "pre_install"
},
{
"box": "",
"created": "2018-12-26 15:34:42.177262",
"text": "Executing configure:php-server in machine testserve-eb-l2gmi-1.",
"level": "configure",
"exit_code": 0,
"machine": "testserve-eb-l2gmi-1",
"finished": "2018-12-26 15:34:44.700000",
"request_id": "df7ce1ca-4477-4c41-84de-16476b22e329",
"event": "configure"
},
{
"text": "Machine testserve-eb-l2gmi-1 successfully reinstalled.",
"request_id": "a0fccf9e-42ac-4cef-9f6b-9f5b28565cd0",
"created": "2018-12-26 15:34:44.965676",
"level": "success"
},
{
"text": "Instance successfully reinstalled.",
"request_id": "a0fccf9e-42ac-4cef-9f6b-9f5b28565cd0",
"created": "2018-12-26 15:34:44.979192",
"level": "success"
},
{
"text": "Reconfiguring instance.",
"request_id": "98299bd7-e89c-4078-b6c6-51d1134cbaba",
"created": "2018-12-26 15:37:03.010128",
"level": "configure"
},
{
"box": "",
"created": "2018-12-26 15:37:05.022507",
"text": "Executing configure:php-server in machine testserve-eb-l2gmi-1.",
"level": "configure",
"exit_code": 0,
"machine": "testserve-eb-l2gmi-1",
"finished": "2018-12-26 15:37:07.540000",
"request_id": "131c170d-0d76-4bec-a3e8-31877c4cf225",
"event": "configure"
},
{
"text": "Machine testserve-eb-l2gmi-1 successfully reconfigured.",
"request_id": "e83e5869-16c3-4a81-9a1f-0e14ff2ca003",
"created": "2018-12-26 15:37:07.801594",
"level": "success"
},
{
"text": "Instance successfully reconfigured.",
"request_id": "e83e5869-16c3-4a81-9a1f-0e14ff2ca003",
"created": "2018-12-26 15:37:07.812196",
"level": "success"
}
]
GET /services/instances/{instance_id}/machine_logs
Gets the logs of one machine for a deployed instance given its instance ID.
URL
Structure
[GET] /services/instances/{instance_id}/machine_logs?machine_name={machine}
Example
[GET] https://cam.ctl.io/services/instances/eb-bbhzh/activity?operation=nfs-client1-eb-osw3o-1
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
machine_name | string | The name of the machine you want to retrieve the log. You can get the name of the machine from the instance document. | Yes |
box | string | Box name. | |
event | string | Event type, there may be nine event lists: configure, dispose, install, post_dispose, post_stop, pre_configure, pre_install, pre_start, start and stop. | |
operation | string | The specific operation id, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure, terminate and terminate_service. |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 403 Forbidden
- 404 Not Found
Response Body
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}/bindings
Gets the binding of an instance when you give the instance ID.
URL
Structure
[GET] /services/instances/{instance_id}/bindings
Example
[GET] https://cam.ctl.io/services/instances/eb-bbhzh/bindings
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 403 Forbidden
- 404 Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
updated | string | Date of the last update. |
operation | string | Last operation, there are seven types of operations: deploy , shutdown , poweron , reinstall , reconfigure , terminate and terminate_service |
name | string | Instance name. |
service | Object | Instance service. |
service.type | string | Can be one of these types: Linux Compute, Windows Compute and CloudFormation Service. |
service.id | string | Service type. |
service.machines | array | List of service machines |
machine | object | Machine contained in the service machines list. |
machine.state | string | Machine state, there are three possible states: processing , done and unavailable. |
machine.name | string | Machine name. |
machine.workflow | array | List of workflow actions, where each workflow action object contains three parameters: box, event, and script. |
workflow.box | string | Workflow action box. |
workflow.event | string | Workflow action event. |
workflow.script | string | 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 | string | Instance uri. |
state | string | Instance state, there are three possible states: processing , done and unavailable |
bindings | array | List of instance bindings. |
binding | object | Binding contained in the bindings list, each binding object contains the parameters: instance and name. |
id | array | Instance unique identifier |
icon | string | Instance icon uri. |
schema | string | Instance schema uri. |
Response Body
[
{
"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.
URL
Structure
[GET] /services/instances/{instance_id}/operations
Example
[GET] https://cam.ctl.io/services/instances/i-b1qtkz/operations
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 403 Forbidden
- 404 Not Found
Response Parameters
Parameter | Type | Description |
---|---|---|
username | string | User name. |
updated | string | Date of the last update. |
created | string | Creation date. |
instance | string | Instance unique identifier. |
state | string | Instance state, there are three possible states: processing , done and unavailable |
workspace | string | Workspace name. |
activities | array | List of activities. |
activity.username | string | User who performed the activity. |
activity.text | string | Activity description. |
activity.level | string | Activity type. |
activity.created | string | Activity date. |
operation | string | Last operation, there are seven types of operations: deploy, shutdown, poweron, reinstall, reconfigure, terminate and terminate_service. |
id | string | Operation unique identifier. |
deleted | string | Removal date. |
schema | string | Operation schema uri. |
Response Body
[
{
"username": "jorge.torres@centurylink.com",
"updated": "2018-12-26 15:21:56.509525",
"created": "2018-12-26 15:18:27.567661",
"deleted": null,
"activity": [
{
"text": "Deploying instance.",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:18:27.582649",
"level": "start"
},
{
"text": "Created security group eb-l2gmi.",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:18:28.270143",
"level": "add"
},
{
"text": "Automatically selected image amzn-ami-pv-2014.03.2.x86_64-ebs.",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:18:29.952413",
"level": "info"
},
{
"text": "Create in Progress for eb-l2gmi (AWS::CloudFormation::Stack): User Initiated.",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:18:30.693042",
"level": "info"
},
{
"text": "Create in Progress for testserveebl2gmi1Machine (AWS::EC2::Instance).",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:18:40.934764",
"level": "info"
},
{
"text": "Create in Progress for testserveebl2gmi1Machine (AWS::EC2::Instance): Resource creation Initiated.",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:18:40.945462",
"level": "info"
},
{
"text": "Create Complete for testserveebl2gmi1Machine (AWS::EC2::Instance).",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:19:11.677807",
"level": "info"
},
{
"text": "Create Complete for eb-l2gmi (AWS::CloudFormation::Stack).",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:19:11.687805",
"level": "info"
},
{
"text": "Waiting to install ElasticBox agent in machine testserve-eb-l2gmi-1.",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"created": "2018-12-26 15:19:12.339171",
"level": "waiting"
},
{
"box": "",
"created": "2018-12-26 15:21:52.584981",
"text": "Executing pre_install:php-server in machine testserve-eb-l2gmi-1.",
"level": "install",
"exit_code": 0,
"machine": "testserve-eb-l2gmi-1",
"finished": "2018-12-26 15:21:53.200000",
"request_id": "4a0c69bc-9164-4f51-b313-d2ad46f50443",
"event": "pre_install"
},
{
"box": "",
"created": "2018-12-26 15:21:53.592944",
"text": "Executing configure:php-server in machine testserve-eb-l2gmi-1.",
"level": "configure",
"exit_code": 0,
"machine": "testserve-eb-l2gmi-1",
"finished": "2018-12-26 15:21:56.190000",
"request_id": "01e52bb8-a6ba-4f36-8d52-056975fc2e34",
"event": "configure"
},
{
"text": "Machine testserve-eb-l2gmi-1 successfully deployed.",
"request_id": "9232da27-2106-46cd-972d-c7014f4ece04",
"created": "2018-12-26 15:21:56.470664",
"level": "success"
},
{
"text": "Instance successfully deployed.",
"request_id": "9232da27-2106-46cd-972d-c7014f4ece04",
"created": "2018-12-26 15:21:56.483589",
"level": "success"
}
],
"instance": "i-b1qtkz",
"state": "done",
"instance_state": "done",
"workspace": "operations",
"request_id": "6886be9c-cdf8-425f-9392-c6f3bb840e22",
"operation": "deploy",
"id": "46e7993d-e259-47a6-a353-fa62128fb288",
"schema": "http://elasticbox.net/schemas/instance-operation"
},
{
"username": "jorge.torres@centurylink.com",
"updated": "2018-12-26 15:30:59.323268",
"created": "2018-12-26 15:29:56.569835",
"deleted": null,
"activity": [
{
"text": "Shutting-down instance.",
"request_id": "0af456dd-86d9-49fd-8ff8-16e3017775a8",
"created": "2018-12-26 15:29:56.584842",
"level": "stop"
},
{
"text": "Machine testserve-eb-l2gmi-1 successfully stopped.",
"request_id": "36c4a9f6-78f2-44dc-af3f-2445017571e3",
"created": "2018-12-26 15:29:57.716319",
"level": "success"
},
{
"text": "Instance successfully stopped.",
"request_id": "36c4a9f6-78f2-44dc-af3f-2445017571e3",
"created": "2018-12-26 15:29:57.727837",
"level": "success"
},
{
"text": "Shutting-down service eb-l2gmi.",
"request_id": "615759d1-1461-44b6-96b8-ad4e9671271a",
"created": "2018-12-26 15:29:57.825175",
"level": "stop"
},
{
"text": "Waiting for shutting-down machines testserve-eb-l2gmi-1.",
"request_id": "615759d1-1461-44b6-96b8-ad4e9671271a",
"created": "2018-12-26 15:29:58.571231",
"level": "waiting"
},
{
"text": "Service eb-l2gmi successfully shutdown.",
"request_id": "615759d1-1461-44b6-96b8-ad4e9671271a",
"created": "2018-12-26 15:30:59.290583",
"level": "success"
}
],
"instance": "i-b1qtkz",
"state": "done",
"instance_state": "done",
"workspace": "operations",
"request_id": "0af456dd-86d9-49fd-8ff8-16e3017775a8",
"operation": "shutdown",
"id": "16f0376a-ae1c-4d26-8156-119f5fba3d27",
"schema": "http://elasticbox.net/schemas/instance-operation"
},
{
"username": "jorge.torres@centurylink.com",
"updated": "2018-12-26 15:33:06.727051",
"created": "2018-12-26 15:31:27.539879",
"deleted": null,
"activity": [
{
"text": "Powering-on instance.",
"request_id": "5d48b218-330b-42bd-b3b0-0349a29c3c58",
"created": "2018-12-26 15:31:27.556072",
"level": "start"
},
{
"text": "Powering-on service eb-l2gmi.",
"request_id": "5d48b218-330b-42bd-b3b0-0349a29c3c58",
"created": "2018-12-26 15:31:27.603268",
"level": "start"
},
{
"text": "Booting machine testserve-eb-l2gmi-1.",
"request_id": "5d48b218-330b-42bd-b3b0-0349a29c3c58",
"created": "2018-12-26 15:31:27.786126",
"level": "info"
},
{
"text": "Waiting to install ElasticBox agent in machine testserve-eb-l2gmi-1.",
"request_id": "5d48b218-330b-42bd-b3b0-0349a29c3c58",
"created": "2018-12-26 15:31:28.176402",
"level": "waiting"
},
{
"box": "",
"created": "2018-12-26 15:33:03.801318",
"text": "Executing configure:php-server in machine testserve-eb-l2gmi-1.",
"level": "configure",
"exit_code": 0,
"machine": "testserve-eb-l2gmi-1",
"finished": "2018-12-26 15:33:06.440000",
"request_id": "7d39719d-236e-4277-bd0f-0c0ca21a941c",
"event": "configure"
},
{
"text": "Machine testserve-eb-l2gmi-1 successfully powered-on.",
"request_id": "78d61086-0fdc-4a3a-84c7-2848c88d0bed",
"created": "2018-12-26 15:33:06.706192",
"level": "success"
},
{
"text": "Instance successfully powered-on.",
"request_id": "78d61086-0fdc-4a3a-84c7-2848c88d0bed",
"created": "2018-12-26 15:33:06.716120",
"level": "success"
}
],
"instance": "i-b1qtkz",
"state": "done",
"instance_state": "done",
"workspace": "operations",
"request_id": "5d48b218-330b-42bd-b3b0-0349a29c3c58",
"operation": "poweron",
"id": "3776fe57-879c-4c93-b1c8-56abbc6757c0",
"schema": "http://elasticbox.net/schemas/instance-operation"
},
{
"username": "jorge.torres@centurylink.com",
"updated": "2018-12-26 15:34:44.995543",
"created": "2018-12-26 15:34:37.718774",
"deleted": null,
"activity": [
{
"text": "Reinstalling instance.",
"request_id": "162fc44b-c2a0-4873-a42e-0778d4f628ea",
"created": "2018-12-26 15:34:37.732658",
"level": "install"
},
{
"box": "",
"created": "2018-12-26 15:34:39.306274",
"text": "Executing pre_install:php-server in machine testserve-eb-l2gmi-1.",
"level": "install",
"exit_code": 0,
"machine": "testserve-eb-l2gmi-1",
"finished": "2018-12-26 15:34:41.870000",
"request_id": "31be6340-2a11-4cad-9643-8082f44515ac",
"event": "pre_install"
},
{
"box": "",
"created": "2018-12-26 15:34:42.177262",
"text": "Executing configure:php-server in machine testserve-eb-l2gmi-1.",
"level": "configure",
"exit_code": 0,
"machine": "testserve-eb-l2gmi-1",
"finished": "2018-12-26 15:34:44.700000",
"request_id": "df7ce1ca-4477-4c41-84de-16476b22e329",
"event": "configure"
},
{
"text": "Machine testserve-eb-l2gmi-1 successfully reinstalled.",
"request_id": "a0fccf9e-42ac-4cef-9f6b-9f5b28565cd0",
"created": "2018-12-26 15:34:44.965676",
"level": "success"
},
{
"text": "Instance successfully reinstalled.",
"request_id": "a0fccf9e-42ac-4cef-9f6b-9f5b28565cd0",
"created": "2018-12-26 15:34:44.979192",
"level": "success"
}
],
"instance": "i-b1qtkz",
"state": "done",
"instance_state": "done",
"workspace": "operations",
"request_id": "162fc44b-c2a0-4873-a42e-0778d4f628ea",
"operation": "reinstall",
"id": "485be288-a545-4cab-8ade-f5b24832ae01",
"schema": "http://elasticbox.net/schemas/instance-operation"
},
{
"username": "jorge.torres@centurylink.com",
"updated": "2018-12-26 15:37:07.824425",
"created": "2018-12-26 15:37:02.998807",
"deleted": null,
"activity": [
{
"text": "Reconfiguring instance.",
"request_id": "98299bd7-e89c-4078-b6c6-51d1134cbaba",
"created": "2018-12-26 15:37:03.010128",
"level": "configure"
},
{
"box": "",
"created": "2018-12-26 15:37:05.022507",
"text": "Executing configure:php-server in machine testserve-eb-l2gmi-1.",
"level": "configure",
"exit_code": 0,
"machine": "testserve-eb-l2gmi-1",
"finished": "2018-12-26 15:37:07.540000",
"request_id": "131c170d-0d76-4bec-a3e8-31877c4cf225",
"event": "configure"
},
{
"text": "Machine testserve-eb-l2gmi-1 successfully reconfigured.",
"request_id": "e83e5869-16c3-4a81-9a1f-0e14ff2ca003",
"created": "2018-12-26 15:37:07.801594",
"level": "success"
},
{
"text": "Instance successfully reconfigured.",
"request_id": "e83e5869-16c3-4a81-9a1f-0e14ff2ca003",
"created": "2018-12-26 15:37:07.812196",
"level": "success"
}
],
"instance": "i-b1qtkz",
"state": "done",
"instance_state": "done",
"workspace": "operations",
"request_id": "98299bd7-e89c-4078-b6c6-51d1134cbaba",
"operation": "reconfigure",
"id": "3de6477a-5e16-432f-a98a-8ec99f95ac1a",
"schema": "http://elasticbox.net/schemas/instance-operation"
}
]
PUT /services/instances/{instance_id}/deploy
Re-deploys an existing instance. It requires the specified id instance_id.
URL
Structure
[PUT] /services/instances/{instance_id}/deploy
Example
[PUT] https://cam.ctl.io/services/instances/i-ndt46z/deploy
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 409 Operation Conflict
PUT /services/instances/{instance_id}/poweron
Powers on an existing instance when you give the instance ID.
URL
Structure
[PUT] /services/instances/{instance_id}/poweron
Example
[PUT] https://cam.ctl.io/services/instances/i-b1qtkz/poweron
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 409 Operation Conflict
PUT /services/instances/{instance_id}/shutdown
Shuts down an existing instance when you give the instance ID.
URL
Structure
[PUT] /services/instances/{instance_id}/shutdown
Example
[PUT] https://cam.ctl.io/services/instances/i-b1qtkz/shutdown
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 409 Operation Conflict
PUT /services/instances/{instance_id}/reinstall
Reinstalls an existing instance when you give its ID.
URL
Structure
[PUT] /services/instances/{instance_id}/reinstall
Example
[PUT] https://cam.ctl.io/services/instances/i-b1qtkz/reinstall
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 409 Operation Conflict
PUT /services/instances/{instance_id}/reconfigure
Re-configures an existing instance when you give its ID.
URL
Structure
[PUT] /services/instances/{instance_id}/reconfigure
Example
[PUT] https://cam.ctl.io/services/instances/i-b1qtkz/reconfigure
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 409 Operation Conflict
Response Body
{
"id":"i-4g166v",
"method":"reconfigure"
}
PUT /services/instances/{instance_id}/import
Retries to import an unregistered instance when you give its ID.
URL
Structure
[PUT] /services/instances/{instance_id}/import
Example
[PUT] https://cam.ctl.io/services/instances/i-ndt46z/import
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 403 Forbidden
- 404 Not Found
Response Body
{
"id":"i-eruumb",
"method":"import"
}
PUT /services/instances/{instance_id}/cancel_import
Cancels a failed import of an unregistered instance when you give its ID.
URL
Structure
[PUT] /services/instances/{instance_id}/cancel_import
Example
[PUT] https://cam.ctl.io/services/instances/i-ndt46z/cancel_import
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 403 Forbidden
- 404 Not Found
Response Body
{
"id":"i-eruumb",
"method":"cancel_import"
}
PUT /services/instances/{instance_id}/abort_operation
Abort a processing operation executing scripts on an instance when you give its ID.
The instance has to be on processiong state and running event scripts.
Also edit permissions on the instance are required.
URL
Structure
[PUT] /services/instances/{instance_id}/abort_operation
Example
[PUT] https://cam.ctl.io/services/instances/i-ndt46z/abort_operation
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Parameter | Type | Description | Req. |
---|---|---|---|
instance_id | string | Instance id | Yes |
Response
Normal Response Codes
- 200 OK
Common Error Response Codes
- 403 Forbidden
- 404 Not Found
Delegate Management of an existing Instance
This service allows the user to delegate the management of an existing Instance to CenturyLink.
When to Use It
Use this API operation if you want CL to be able to manage your instance on your behalf.
NOTE: The following requirements need to be met in order to be able to make an instance managed:
- Only "compute" instances (Linux and Windows) can be managed.
- Terms and conditions need to be accepted. In order to do this, the following url param needs to be set to true:
accept_terms=true
- The Instance needs to be in "Done" status.
- The user making the request needs to have write permissions on the instance.
- The company owning the instance needs to support "Delegate Management".
Supported Operating Systems
- Linux
- Windows
URL
Structure
[PUT] /services/instances/{instance_id}/make_managed_os
Example
PUT https://cam.ctl.io/services/instances/i-fbs9ow/make_managed_os?accept_terms=true
Request
Headers
Content-Type: application/json
Authorization: Bearer your_json_web_token
ElasticBox-Release: 4.0
URI Parameters
Name | Type | Description | Req. |
---|---|---|---|
InscanceId | string | Id of the Instance | Yes |
accept_terms | boolean | Indicates that the client accepts the terms and conditions | Yes |
Response
Normal Response Codes
- 202 Accepted
Common Error Response Codes
- Bad Request (400) - Request includes invalid, incomplete or missing parameters (details provided inside body)
- Unauthorized (401) - Invalid access token/cookie
- Forbidden (403) - User doesn’t belong to the organization
- Not Found (404) - Organization not found
Deploy a Box
Overview
This guide shows how to deploy a mongoDB instance using the Cloud Application Manager API. In this sample, we deploy a MongoDB instance using the existing MongoDB public box, the steps you need are:
- Authenticate with Cloud Application Manager
- Declare Deployment Arguments
- Register a Provider in Cloud Application Manager
- Create a Deployment Policy Box
- 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.
Authenticate with Cloud Application Manager
First of all, you should be Administrator on the target workspace or have Administrator access to your organization in Cloud Application Manager.
Before calling to the API you have to log in into the Cloud Application Manager website and get an authentication token. You will use this token later as an http header to perform every call to the Cloud Application Manager API.
Declare Deployment Arguments
Next variables are set with script calling parameters. This way, each time you run the script, you can pass different deployment arguments. These declared variables are referenced later in your script as request parameter values.
Variable | Type | Description |
---|---|---|
provider_key provider_secret |
string | We will need the provider account key and secret to register a provider. See below how to register a provider and get its parameters. |
json_web_token | string | This is the authentication token obtained before. An example is eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJvcGVyYb25z... |
environment | string | Set your URL organization hostname or your appliance IP, where API calls are sent. Examples are: cam.ctl.io (if you are using CAM SaaS edition), 192.168.1.10 (for a local CAM appliance). |
owner | string | Specify the user ID in Cloud Application Manager who owns the provider account. You can retrieve it from the GET provider API call, in the returned owner field. |
username | string | Name of the admin user. |
password | string | Password of the admin user. |
Start your script with the following lines:
# Deployment common variables
provider_key=$1
provider_secret=$2
json_web_token=$3
environment=$4
owner=$5
username=$6
password=$7
There are other variables obtained during the script execution and necessary in next script steps.
Variable | Type | Description |
---|---|---|
provider_id | string | Obtained when registering a provider. |
policy_box_id | string | Obtained when creating a deployment policy box. |
instance_id | string | Obtained when deployin a box instance. |
Register a Provider in Cloud Application Manager
A provider is a public or private cloud account you can register in Cloud Application Manager.
To register a provider we send a POST request to the Provider object with the required parameters.
In this case, we choose to create an AWS as provider in the appliance. From the AWS account credentials we will need the key and the secret right now. Creating it in an organization service requires ARN code as credential. You can obtain the required parameters for other providers in Provider object API doc.
If there’s an error registering the provider, we output the error. Else, we output the provider ID and save it in provider_id variable.
Add the following lines to your script:
# Register the provider AWS in Cloud Application Manager script
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 Provider example via API\",
\"credentials\": {
\"key\": \"$provider_key\",
\"secret\": \"$provider_secret\"
},
\"owner\": \"$owner\"
}"
provider=$(curl -k -s \
-X POST \
-H "Authorization:Bearer $json_web_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 Deployment Policy Box
A deployment policy box is where you specify settings to deploy applications in a specific virtual environment.
To create a deployment policy box we send a POST request to the Box object with the provider ID obtained when registering the provider in the provider_id variable.
If there’s an error in creating the deployment policy box, we output the error. Else, we output the created deployment policy box ID and save it in policy_box_id variable.
Add the following lines to your script:
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 "Authorization:Bearer $json_web_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
To deploy a MongoDB instance using the existing MongoDB public box, we send a POST request to the Instances object with the box ID of the MongoDB box mongo_box_id variable and the policy box ID obtained when creating the policy box in the policy_box_id variable.
If there’s an error deploying instance, we output the error. Else, we output the deployed instance ID and save it in instance_id variable.
Add the following lines to your script:
#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 "Authorization:Bearer $json_web_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 "Authorization:Bearer $json_web_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 "Authorization:Bearer $json_web_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 "Authorization:Bearer $json_web_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 "Authorization:Bearer $json_web_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 \ProgramData\ElasticBox\Logs\elasticbox-agent.log
Instance Flow
In this article
- Overview
- Authenticate with Cloud Application Manager
- Obtain Deployment Variables
- Register a Provider in Cloud Application Manager
- Create a Deployment Policy Box
- Create a Custom Box
- Deploy the Instance
- Terminate and Delete the Instance
- Contacting Cloud Application Manager Support
Overview
This guide shows how to use Cloud Application Manager API from Registering a Provider to the Deployment of an Instance.
Notes:
-
The following examples use cURL command to send HTTP requests to the API objects in JSON. JSON is the required format for all API requests and responses.
-
cURL command is used with the -k parameter for convenience, allowing it to proceed and operate even for server connections considered insecure. Don't use it in production.
-
When executing a command, it takes a while for the resources to be ready, and calling the next step before the previous is completed may lead to error (i.e. right after creating the provider it will start the synchronization, and the deployment box cannot be created until the first sync completes).
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
First of all, you need to hold the administrator role on a workspace to be able to run these steps. You must obtain Administrator access to Cloud Application Manager.
Before calling to the API you have to sign in into the Cloud Application Manager website and get an authentication token. You will use this token as an authentication HTTP header to perform every call to the Cloud Application Manager API.
Obtain Deployment Variables
Next, define the variables that will contain the parameters of the script. This way, each time you run the script, you can pass different deployment arguments. These declared variables are referenced later in your script as request parameter values.
Variable | Description |
---|---|
provider_key | You need the provider account key and secret to register a provider. |
provider_secret | See below how to register a provider and get its parameters. |
json_web_token | This is the authentication token obtained before. It's a long BASE64 encoded string that starts with something like: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJvcGVyYb25z... |
environment | Set your URL organization hostname or your appliance IP, where API calls are sent. Examples are: cam.ctl.io, your-organization.cam.ctl.io, 192.168.1.10. |
owner | Specify the user ID in Cloud Application Manager who owns the provider account. |
Start with your script with the following lines:
# Deployment common variables
provider_key=$1
provider_secret=$2
json_web_token=$3
environment=$4
owner=$5
There are other variables obtained during the script execution and necessary in next script steps.
Variable | Description |
---|---|
provider_id | Obtained when registering a provider. |
policy_box_id | Obtained when creating a deployment policy box. |
box_id | Obtained when creating a custom box. |
instance_id | Obtained when deployin a box instance. |
Register a Provider in Cloud Application Manager
A provider is a public or private cloud account you can register in Cloud Application Manager.
To register a provider send a POST request to the Providers endpoint with the required parameters.
This example follows the steps to create an AWS provider in a Cloud Application Manager appliance. It will be necessary a key and the secret pair.
Creating it in an organization service requieres a role ARN as credential instance of a key pair.
Other provider types require different credential sets that you can check in the Providers endpoint API doc.
If there’s an error registering the provider, it outputs the error. Else, it outputs the provider ID and saves it in provider_id variable.
Add the following lines to the script:
# Register the provider AWS in Cloud Application Manager script
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 Provider example via API\",
\"credentials\": {
\"key\": \"$provider_key\",
\"secret\": \"$provider_secret\"
},
\"owner\": \"$owner\"
}"
provider=$(curl -k -s \
-X POST \
-H "Authorization:Bearer $json_web_token" \
-H "elasticbox-release:4.0" \
-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 Deployment Policy Box
A deployment policy box contains the settings to deploy applications in a specific virtual environment. For AWS, it contains details about the region, VPC, security groups, etc.
To create a deployment policy box send a POST request to the Boxes endpoint with the provider ID obtained when registering the provider in the provider_id variable.
If there’s an error in creating the deployment policy box, it outputs the error. Else, it outputs the created deployment policy box ID and saves it in policy_box_id variable.
Add the following lines to the script:
# Once the provider has been created, the proper policy box can be set
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 via API\",
\"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 "Authorization:Bearer $json_web_token" \
-H "elasticbox-release:4.0" \
-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
A script box defines the behavior of your application during deployment, reconfiguration and termination.
To create a box send a POST request to the Boxes endpoint.
Also use two already created blobs. You can take a look to the Blobs endpoint, API documentation if you need to know how you can create them.
If there’s an error creating this box, it outputs the error. Else, it outputs the box ID and saves it in box_id variable.
Add the following lines to the script:
# Create a box to deploy with that policy box. In this case use a previously uploaded scripts.
payload="{
\"automatic_updates\": \"off\",
\"requirements\": [
],
\"description\": \"create box example 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 "Authorization:Bearer $json_web_token" \
-H "elasticbox-release:4.0" \
-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 deploy an instance of the previous box, send a POST request to the Instances endpoint with the box ID obtained when creating the box in the box_id variable and the policy box ID obtained when creating the policy box in the policy_box_id variable.
If there’s an error deploying the instance, it outputs the error. Else, it outputs the deployed instance ID and saves it in instance_id variable.
Add the following lines to the script:
# Finally, 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 "Authorization:Bearer $json_web_token" \
-H "elasticbox-release:4.0"
-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 and Delete the Instance
Removing the instance from the virtual machine must be done into two steps: first, terminate the instance and second, delete it.
Terminate runs the stop and terminate events scripts, and then removes the cloud resources, but does not remove the instance from the Cloud Application Manager database. Send a DELETE request to the Instances endpoint with the instance ID obtained when deploying the instance in the instance_id variable and with an operation=terminate
URL parameter.
Then check its response status. If it’s 200, the specific instance has been terminated. Else, check the error state from the response.
You can force terminate it using operation=force_terminate
URL parameter. See detailed DELETE API command in Instances API.
Add the following lines to the script:
curl -k -s \
-X DELETE \
-H "Authorization:Bearer $json_web_token" \
-H "elasticbox-release:4.0" \
-H "Accept: application/json, text/plain, */*" \
-H "Accept-encoding: gzip, deflate" \
https://$environment/services/instances/$instance_id??operation=terminate
echo "Undeployed box instance: $instance_id"
Afterwards, send a DELETE command again with an operation=delete
URL parameter to remove definitely the instance from Cloud Application Manager.
Copy previous script lines again and override the last two lines with these new ones:
https://$environment/services/instances/$instance_id??operation=delete
echo "Removed box instance: $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 \ProgramData\ElasticBox\Logs\elasticbox-agent.log