Environment methods

GET /api/1/organizations/(orgId)/environments

Returns list of all environments in given organization.

Parameters:
  • orgId (uuid) – id of organization
Status Codes:

Response body:

[
  {
    "id" : "50cb3dbbe4b05b3ddfe9492a",
    "name" : "Development environment",
    "isDefault" : true
  },
  ...
]
PUT /api/1/environments/(uuid: id)

Imports a specific environment (policies only) in the yaml format. Please, note that the existing environment will be replaced NOT merged.

Parameters:
  • id (uuid) – id of the environment
Status Codes:

Request body:

policies:
   provisionVms.publicKeyId: 508edd1de4b0cb4c526a61af
   provisionVms.ignoreFail: false

Must be application/x-yaml.

GET /api/1/environments/(uuid: id)

Returns a specific environment (policies only) in YAML format.

Parameters:
  • id (uuid) – id of the environment
Status Codes:

Request headers (optional):

Accept: application/x-yaml

Response:

policies:
   provisionVms.publicKeyId: 508edd1de4b0cb4c526a61af
   provisionVms.ignoreFail: false
POST /api/1/environments/(uuid: id)/clone

Creates a precise copy of the enviroment with the passed id.

Parameters:
  • id (uuid) – id of the environment
Status Codes:

Request body:

{
  "name": "My Cloned Environment Name"
}

The request body is optional but if passed it must be application/json. If the request body is omitted the cloned environment will get an auto-generated name.

Response:

{
  "id": "522f0176e4b07d962112ad58",
  "name": "My Cloned Environment Name"
}
PUT /api/1/environments/(uuid: id)/markers

Updates environment markers.

Parameters:
  • id (uuid) – id of the environment
Status Codes:

Request body:

{
  "markers" : [
    { "name" : "has-internet-access" },
    { "name" : "has-multicast-routing" }
  ]
}

Must be application/json.

GET /api/1/environments/(uuid: id)/markers

Gets environment markers.

Parameters:
  • id (uuid) – id of the environment
Status Codes:

Response:

{
  "markers" : [
    { "name" : "has-internet-access" },
    { "name" : "has-multicast-routing" }
  ]
}
PUT /api/1/environments/(uuid: id)/properties

Updates environment properties. The available property types are object, string, int, bool, list<T> and map<K,V> where T, K, V are types themselves.

Parameters:
  • id (uuid) – id of the environment
Status Codes:

Request body:

{
  "properties" : [
    { "name" : "database-jdbc-url", "value" : "jdbc:mysql://localhost:3306", "type" : "string" },
    { "name" : "websphere-port",    "value" : 9080,                          "type" : "int" }
  ]
}

Must be application/json.

GET /api/1/environments/(uuid: id)/properties

Gets environment properties.

Parameters:
  • id (uuid) – id of the environment
Status Codes:

Response:

{
  "properties" : [
    { "name" : "database-jdbc-url", "value" : "jdbc:mysql://localhost:3306", "type" : "string" },
    { "name" : "websphere-port",    "value" : 9080,                          "type" : "int" }
  ]
}