Environments

An environment is a logical grouping of hosts. Settings may be associated to an environment, in particular for template rendering.

Representation

The following elements are defined as part of an environment representation:

  • name: The name of the environment. Cannot be null. Must be unique organization-wide.
  • description: A human friendly description of the environment.
  • version: A version number managed by the system. This value is read-only and is incremented on each changes to the resource.
  • organization: The name of the organization to which this environment belong. This field is read-only.
  • hosts: The name of the hosts defined in this environment. This field is read-only.
  • settings: A list of settings defined for this host. This field is read-only.

Example

{
    "name": "Test Environment",
    "description": "Test environment of test organization",
    "version": 1,
    "organization": "Guardis Test", 
    "hosts": [
        "test-host-on-Hyp3"
    ], 
    "settings": []
}

Methods

Collection

/organizations/{org_name}/environments
  • GET: returns all the environments in the organization.
  • POST: adds a new environment to the organization.

Entity

/organizations/{org_name}/environments/{env_name}
  • GET: returns an existing environment.
  • PUT: updates an existing environment (read-only fields are ignored).
  • DELETE: deletes an environment.

Other

Cloning

/organizations/{org_name}/environments/{env_name}/_clone?name=new_name
  • PUT: clones an existing environment; created environment has provided name.

Audit

/organizations/{org_name}/environments/{env_name}/audit
  • GET: returns all audit logs for this environment.

Sub-collections