A first API call: What deployments are there?

As a first API call, let’s use a GET request to retrieve information about existing Elasticsearch clusters that are part of deployments:

curl -k -X GET -u $USER:$PASSWORD https://$COORDINATOR_HOST:12443/api/v1/clusters/elasticsearch
{
  "return_count": 2,
  "elasticsearch_clusters": [{
    "cluster_name": "logging-and-metrics",
    "associated_apm_clusters": [],
    "plan_info": {
      "healthy": true,
      "history": []
    },
    ...
    ]
    }
    ...
    "cluster_id": "fbbc90c8540843adaa4304b4a5cf9eba"
  }, {
    "cluster_name": "admin-console-elasticsearch",
    "associated_apm_clusters": [],
    "plan_info": {
      "healthy": true,
      "history": []
    },
    ...
    ]
    }
    ...
    ,
    "external_links": [],
    "cluster_id": "4e8c2d90e94b4a1a9a9b2c83145a8df1"
  }]
}

A user with sufficient privileges, such as the admin user

The password for the user

A host that you installed Elastic Cloud Enterprise on that holds the coordinator role

To simplify things, we’ve omitted some sections from the JSON output. There are two Elasticsearch clusters, logging-and-metrics and admin-console-elasticsearch which are part of deployments that get created with every installation of Elastic Cloud Enterprise. Take care when modifying these clusters, as they are part of the control plane of ECE. To keep your installation safe, some operations are not allowed on these clusters, but we do recommend that you enable fault tolerance and resize them.

A note on terminology

If this is your first time using the ECE API, some of the terminology in the JSON output will likely be unfamiliar. For example, there is a reference to the term “plan” in output fields such as plan_info. A plan is just a cluster configuration that gets applied to a cluster. When you change a cluster to resize it, for example, you are applying a new plan.

In the UI, there are also many references to deployments that Elasticsearch clusters, Kibana instances, and other products of the Elastic Stack running on ECE are grouped into. If you look at the JSON output, you will notice that there is no mention of deployments at all. The reason for this is that the entire plan for a cluster is part of a deployment. For example: When you are running an Elasticsearch cluster that has a Kibana instance associated with it, you are running a deployment.