/environments [ POST ]

Set a new environment.


Body Parameters


Name Optional Valid values
environment_id No string: environment unique name (e.g. test55433)
environment_type No string: any alphanumeric (no spaces) string that classify the type for this environment.
agents Yes Map of agents and agents environment related properties: 
## If the environment contains more than one agent, role must be provided per agent.
## For a single agent environment, the system adds a default role: "Agent".

{
  "my-agent-1" : {
      "role" : "web",
      "apache": "v1.0.3"
  },
  "my-agent-2" : {
      "role" : "db"
  }
}

 


Request Examples      

curl -k -u admin:admin -X POST -H "Content-Type: application/json" -d '{
    "environment_id" : "test12345",
    "environment_type": "two_nodes_test_cluster",
    "agents": {
       "my-agent-1" : {
           "role" : "Node1",
           "instance_id": "i-3a535000"
        },
        "my-agent-2" : {
            "role" : "Node2",
            "instance_id": "i-3a535456"
        }
    }
}' https://OPERETOHOST/environments

   

Response Example     

{"status": "success"}