Clusters - Elasticsearch - CRUD - Configuration

Get cross-cluster search clusters

Returns the list of cross-cluster search clusters' IDs for the remote cluster.

Request

GET /api/v1/clusters/elasticsearch/{cluster_id}/ccs

Path parameters

Name Type Required Description

cluster_id

string

Y

Elasticsearch cluster identifier

Responses

200
(CrossClusterSearchClusters) List of cross-cluster search clusters' IDs for the remote cluster
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/ccs \
-u $CLOUD_USER:$CLOUD_KEY

Get remote clusters for cross-cluster search

Returns cross-cluster search configuration for the Elasticsearch cluster.

Request

GET /api/v1/clusters/elasticsearch/{cluster_id}/ccs/settings

Path parameters

Name Type Required Description

cluster_id

string

Y

Elasticsearch cluster identifier

Responses

200
(CrossClusterSearchSettings) The configuration for cross-cluster search
404
(BasicFailedReply) The cluster specified by {cluster_id} or a remote cluster cannot be found (code: 'clusters.cluster_not_found')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/ccs/settings \
-u $CLOUD_USER:$CLOUD_KEY

Set remote clusters for cross-cluster search

Overwrites or creates the cross-cluster search configuration for the Elasticsearch cluster.

Request

PUT /api/v1/clusters/elasticsearch/{cluster_id}/ccs/settings

Path parameters

Name Type Required Description

cluster_id

string

Y

Elasticsearch cluster identifier

Request body

(CrossClusterSearchSettings) (required) Remote clusters for cross-cluster search

Responses

202
(EmptyResponse) The configuration for remote clusters was updated
404
(BasicFailedReply) The cluster specified by {cluster_id} or a remote cluster cannot be found (code: 'clusters.cluster_not_found')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPUT {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/ccs/settings \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "remote_clusters" : {
      "some_property" : {
         "cluster_id" : "string",
         "skip_unavailable" : true
      }
   }
}
'

Get cluster curation settings

Retrieves cluster curation settings for an Elasticsearch cluster.

Request

GET /api/v1/clusters/elasticsearch/{cluster_id}/curation/settings

Path parameters

Name Type Required Description

cluster_id

string

Y

Elasticsearch cluster identifier

Responses

200

(ClusterCurationSettings) The cluster curation settings were successfully returned

Headers

x-cloud-resource-created (string)
The date-time when the resource was created (ISO format relative to UTC)
x-cloud-resource-last-modified (string)
The date-time when the resource was last modified (ISO format relative to UTC)
x-cloud-resource-version (string)
The resource version, which is used to avoid update conflicts with concurrent operations
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/curation/settings \
-u $CLOUD_USER:$CLOUD_KEY

Update cluster curation settings

Overrides cluster curation settings for an Elasticsearch cluster.

Request

PUT /api/v1/clusters/elasticsearch/{cluster_id}/curation/settings

Path parameters

Name Type Required Description

cluster_id

string

Y

The Elasticsearch cluster identifier.

Query parameters

Name Type Required Description

version

integer

N

If specified then checks for conflicts against the version of the cluster curation settings (returned in 'x-cloud-resource-version' of the GET request)

Request body

(ClusterCurationSettings) (required) The cluster curation settings including updated values

Responses

200

(ClusterCurationSettings) The cluster curation settings were successfully updated

Headers

x-cloud-resource-created (string)
The date-time when the resource was created (ISO format relative to UTC)
x-cloud-resource-last-modified (string)
The date-time when the resource was last modified (ISO format relative to UTC)
x-cloud-resource-version (string)
The resource version, which is used to avoid update conflicts with concurrent operations
403
(BasicFailedReply) The provided action was prohibited for the given cluster.
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPUT {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/curation/settings \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "specs" : [
      {
         "index_pattern" : "string",
         "trigger_interval_seconds" : 0
      }
   ]
}
'

Set settings overrides (all instances)

Overrides the settings for all of the instances in the Elasticsearch cluster.

Request

PUT /api/v1/clusters/elasticsearch/{cluster_id}/instances/settings

Path parameters

Name Type Required Description

cluster_id

string

Y

The Elasticsearch cluster identifier.

Query parameters

Name Type Required Description

restart_after_update

boolean; default: false

N

After overrides are applied, restarts the instances.

Request body

(ElasticsearchClusterInstanceSettingsOverrides) (required) The settings to override for the instances

Responses

200
(ElasticsearchClusterInstanceSettingsOverrides) Returns the updated settings overrides for the specified instances
404
(BasicFailedReply) The cluster specified at {cluster_id} could not be found (code: 'clusters.cluster_not_found')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPUT {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/instances/settings \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "instance_capacity" : 0,
   "storage_multiplier" : 0.1
}
'

Set settings overrides

Overrides the settings for the specified instances in the Elasticsearch cluster.

Request

PUT /api/v1/clusters/elasticsearch/{cluster_id}/instances/{instance_ids}/settings

Path parameters

Name Type Required Description

cluster_id

string

Y

The Elasticsearch cluster identifier.

instance_ids

array[string]

Y

A comma-separated list of instance identifiers.

Query parameters

Name Type Required Description

ignore_missing

boolean; default: false

N

When true and the instance does not exist, proceeds to the next instance, or treats the instance as an error.

restart_after_update

boolean; default: false

N

After overrides are applied, restarts the instances.

Request body

(ElasticsearchClusterInstanceSettingsOverrides) (required) The settings to override for the specified instances.

Responses

200
(ElasticsearchClusterInstanceSettingsOverrides) Returns the updated settings overrides for the specified instances
404
(BasicFailedReply) One or more of the instances specified at {instance_ids} could not be found (code: 'clusters.instances_not_found')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPUT {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/instances/{instance_ids}/settings \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "instance_capacity" : 0,
   "storage_multiplier" : 0.1
}
'

Get settings from this cluster’s keystore

Returns the available keys in the keystore.

Request

GET /api/v1/clusters/elasticsearch/{cluster_id}/keystore

Path parameters

Name Type Required Description

cluster_id

string

Y

The Elasticsearch cluster identifier

Responses

200
(KeystoreContents) The keystore settings are returned
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
449
(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/keystore \
-u $CLOUD_USER:$CLOUD_KEY

Add or remove settings

Adds the specified values to the Elasticsearch keystore, or removes the keys for the unspecified values.

Request

PATCH /api/v1/clusters/elasticsearch/{cluster_id}/keystore

Path parameters

Name Type Required Description

cluster_id

string

Y

Identifier for the Elasticsearch cluster

Request body

(KeystoreContents) (required) Keystore settings to update

Responses

202
(KeystoreContents) The keystore will be updated
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
449
(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPATCH {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/keystore \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "secrets" : {
      "some_property" : {
         "as_file" : true,
         "value" : {}
      }
   }
}
'

Set cluster name

Assigns a name to the Elasticsearch cluster.

Request

PUT /api/v1/clusters/elasticsearch/{cluster_id}/metadata/name/{new_name}

Path parameters

Name Type Required Description

cluster_id

string

Y

Elasticsearch cluster identifier

new_name

string

Y

The new name for the cluster.

Responses

200
(EmptyResponse) The cluster name was successfully changed
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
449
(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPUT {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/metadata/name/{new_name} \
-u $CLOUD_USER:$CLOUD_KEY

Get cluster metadata

Advanced use only. Retrieves the internal cluster metadata, in free-form JSON, for the Elasticsearch cluster.

Request

GET /api/v1/clusters/elasticsearch/{cluster_id}/metadata/raw

Path parameters

Name Type Required Description

cluster_id

string

Y

Elasticsearch cluster identifier

Responses

200

(object) The cluster metadata was successfully returned

Headers

x-cloud-resource-created (string)
The date-time when the resource was created (ISO format relative to UTC)
x-cloud-resource-last-modified (string)
The date-time when the resource was last modified (ISO format relative to UTC)
x-cloud-resource-version (string)
The resource version, which is used to avoid update conflicts with concurrent operations
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/metadata/raw \
-u $CLOUD_USER:$CLOUD_KEY

Set cluster metadata

Advanced use only. Sets the internal metadata, in free-form JSON, for the Elasticsearch cluster. Only use the parameter to set the modified JSON that is returned from the get version of the metadata.

Request

POST /api/v1/clusters/elasticsearch/{cluster_id}/metadata/raw

Path parameters

Name Type Required Description

cluster_id

string

Y

Elasticsearch cluster identifier

Query parameters

Name Type Required Description

version

integer

N

Checks for conflicts against the metadata version, then returns the value in the x-cloud-resource-version header.

Request body

(string) (required) The freeform JSON for the cluster (should always be based on the current version retrieved from the GET)

Responses

200

(object) The cluster metadata was successfully changed (the updated JSON is returned)

Headers

x-cloud-resource-created (string)
The date-time when the resource was created (ISO format relative to UTC)
x-cloud-resource-last-modified (string)
The date-time when the resource was last modified (ISO format relative to UTC)
x-cloud-resource-version (string)
The resource version, which is used to avoid update conflicts with concurrent operations
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
449
(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPOST {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/metadata/raw \
-u $CLOUD_USER:$CLOUD_KEY

Get cluster metadata settings

Retrieves a structured version of the cluster metadata as a collection of top-level settings. If a particular setting isn't returned, then the free-form JSON endpoint (/metadata/raw) must be used.

Request

GET /api/v1/clusters/elasticsearch/{cluster_id}/metadata/settings

Path parameters

Name Type Required Description

cluster_id

string

Y

Elasticsearch cluster identifier

Responses

200

(ClusterMetadataSettings) The cluster metadata was successfully returned

Headers

x-cloud-resource-created (string)
The date-time when the resource was created (ISO format relative to UTC)
x-cloud-resource-last-modified (string)
The date-time when the resource was last modified (ISO format relative to UTC)
x-cloud-resource-version (string)
The resource version, which is used to avoid update conflicts with concurrent operations
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/metadata/settings \
-u $CLOUD_USER:$CLOUD_KEY

Update cluster metadata settings

All changes in the specified object are applied to the metadata object. Omitting existing fields causes the same values to be reapplied. Specifying a null value reverts the field to the default value, or removes the field when no default value exists.

Request

PATCH /api/v1/clusters/elasticsearch/{cluster_id}/metadata/settings

Path parameters

Name Type Required Description

cluster_id

string

Y

Elasticsearch cluster identifier

Query parameters

Name Type Required Description

version

integer

N

Checks for conflicts against the metadata version, then returns the value in the x-cloud-resource-version header.

Request body

(ClusterMetadataSettings) (required) The cluster settings including updated values

Responses

200

(ClusterMetadataSettings) The cluster metadata was successfully updated

Headers

x-cloud-resource-created (string)
The date-time when the resource was created (ISO format relative to UTC)
x-cloud-resource-last-modified (string)
The date-time when the resource was last modified (ISO format relative to UTC)
x-cloud-resource-version (string)
The resource version, which is used to avoid update conflicts with concurrent operations
403
(BasicFailedReply) The provided action was prohibited for the given cluster
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
449
(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPATCH {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/metadata/settings \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "contact_email" : "string",
   "hidden" : true,
   "name" : "string",
   "owner_id" : "string",
   "resources" : {
      "cpu" : {
         "boost" : true,
         "hard_limit" : true
      }
   },
   "subscription_level" : "string",
   "system_owned" : true
}
'

Cancel monitoring

Deletes all monitoring destinations for the Elasticsearch cluster.

Request

DELETE /api/v1/clusters/elasticsearch/{cluster_id}/monitoring

Path parameters

Name Type Required Description

cluster_id

string

Y

Elasticsearch cluster identifier

Responses

202
(EmptyResponse) The destination monitoring cluster removal request was initiated
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
449
(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XDELETE {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/monitoring \
-u $CLOUD_USER:$CLOUD_KEY

Set monitoring

Overwrites or creates the monitoring destination for the Elasticsearch cluster.

Request

POST /api/v1/clusters/elasticsearch/{cluster_id}/monitoring/{dest_cluster_id}

Path parameters

Name Type Required Description

cluster_id

string

Y

Elasticsearch cluster identifier

dest_cluster_id

string

Y

The Elasticsearch cluster identifier for the monitoring destination.

Responses

202
(EmptyResponse) The destination monitoring cluster creation/overwrite request was initiated
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
449
(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPOST {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/monitoring/{dest_cluster_id} \
-u $CLOUD_USER:$CLOUD_KEY

Get plan

Retrieves the active plan of the Elasticsearch cluster.

Request

GET /api/v1/clusters/elasticsearch/{cluster_id}/plan

Path parameters

Name Type Required Description

cluster_id

string

Y

The Elasticsearch cluster identifier.

Query parameters

Name Type Required Description

convert_legacy_plans

boolean; default: false

N

When true, converts the plans to the 2.0.x format. When false, uses the 1.x format. The default is false.

enrich_with_template

boolean; default: true

N

When plans are shown, includes the missing elements from the applicable deployment template.

show_plan_defaults

boolean; default: false

N

When plans are shown, includes the default values in the response. NOTE: This option results in large responses.

Responses

200

(ElasticsearchClusterPlan) The cluster has a current applied plan

Headers

x-cloud-resource-created (string)
The date-time when the resource was created (ISO format relative to UTC)
x-cloud-resource-last-modified (string)
The date-time when the resource was last modified (ISO format relative to UTC)
x-cloud-resource-version (string)
The resource version, which is used to avoid update conflicts with concurrent operations
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
412
(BasicFailedReply) There is not currently applied plan - eg the cluster has not finished provisioning, or the provisioning failed (code: 'clusters.cluster_plan_state_error')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/plan \
-u $CLOUD_USER:$CLOUD_KEY

Update plan

Updates the configuration of the Elasticsearch cluster.

Request

POST /api/v1/clusters/elasticsearch/{cluster_id}/plan

Path parameters

Name Type Required Description

cluster_id

string

Y

The Elasticsearch cluster identifier.

Query parameters

Name Type Required Description

validate_only

boolean; default: false

N

When true, validates the cluster definition without performing the update.

Request body

(ElasticsearchClusterPlan) (required) The update plan definition

Responses

200
(ClusterCrudResponse) The cluster definition was valid - no further action was requested. The return object contains an internal representation of the plan, for use in debugging
202
(ClusterCrudResponse) The plan definition was valid and the updated plan is in progress
400
(BasicFailedReply) The cluster definition contained errors (code: 'clusters.cluster_invalid_plan' and 'clusters.plan_feature_not_implemented')
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
412
(BasicFailedReply) Potential risky settings have been specified (code: 'clusters.cluster_plan_state_error')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPOST {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/plan \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "cluster_topology" : [
      {
         "allocator_filter" : {},
         "elasticsearch" : {
            "curation" : {
               "from_instance_configuration_id" : "string",
               "to_instance_configuration_id" : "string"
            },
            "docker_image" : "string",
            "enabled_built_in_plugins" : [
               "string"
            ],
            "node_attributes" : {
               "some_property" : "string"
            },
            "system_settings" : {
               "auto_create_index" : true,
               "default_shards_per_index" : 0,
               "destructive_requires_name" : true,
               "enable_close_index" : true,
               "monitoring_collection_interval" : 0,
               "monitoring_history_duration" : "string",
               "reindex_whitelist" : [
                  "string"
               ],
               "scripting" : {
                  "expressions_enabled" : true,
                  "file" : {
                     "enabled" : true,
                     "sandbox_mode" : true
                  },
                  "inline" : null,
                  "mustache_enabled" : true,
                  "painless_enabled" : true,
                  "stored" : null
               },
               "use_disk_threshold" : true,
               "watcher_trigger_engine" : "string"
            },
            "user_bundles" : [
               {
                  "elasticsearch_version" : "string",
                  "name" : "string",
                  "url" : "string"
               }
            ],
            "user_plugins" : [
               {
                  "elasticsearch_version" : "string",
                  "name" : "string",
                  "url" : "string"
               }
            ],
            "user_settings_json" : {},
            "user_settings_override_json" : {},
            "user_settings_override_yaml" : "string",
            "user_settings_yaml" : "string",
            "version" : "string"
         },
         "instance_configuration_id" : "string",
         "memory_per_node" : 0,
         "node_configuration" : "string",
         "node_count_per_zone" : 0,
         "node_type" : {
            "data" : true,
            "ingest" : true,
            "master" : true,
            "ml" : true
         },
         "size" : {
            "resource" : "string",
            "value" : 0
         },
         "zone_count" : 0
      }
   ],
   "deployment_template" : {
      "id" : "string",
      "version" : "string"
   },
   "elasticsearch" : null,
   "tiebreaker_override" : true,
   "tiebreaker_topology" : {
      "memory_per_node" : 0
   },
   "transient" : {
      "cluster_settings_json" : {},
      "plan_configuration" : {
         "calm_wait_time" : 0,
         "cluster_reboot" : "string",
         "extended_maintenance" : true,
         "max_snapshot_attempts" : 0,
         "move_allocators" : [
            {
               "allocator_down" : true,
               "from" : "string",
               "to" : [
                  "string"
               ]
            }
         ],
         "move_instances" : [
            {
               "from" : "string",
               "instance_down" : true,
               "to" : [
                  "string"
               ]
            }
         ],
         "move_only" : true,
         "override_failsafe" : true,
         "preferred_allocators" : [
            "string"
         ],
         "reallocate_instances" : true,
         "skip_data_migration" : true,
         "skip_post_upgrade_steps" : true,
         "skip_snapshot" : true,
         "skip_upgrade_checker" : true,
         "timeout" : 0
      },
      "restore_snapshot" : {
         "repository_config" : {
            "raw_settings" : {}
         },
         "repository_name" : "string",
         "restore_payload" : {
            "indices" : [
               "string"
            ],
            "raw_settings" : {}
         },
         "snapshot_name" : "string",
         "source_cluster_id" : "string",
         "strategy" : "string"
      },
      "strategy" : {
         "grow_and_shrink" : {},
         "rolling" : {
            "allow_inline_resize" : true,
            "group_by" : "string",
            "shard_init_wait_time" : 0,
            "skip_synced_flush" : true
         },
         "rolling_grow_and_shrink" : {}
      }
   },
   "zone_count" : 0
}
'

Migrate plan

Migrates the configuration of the Elasticsearch cluster to a different template.

Request

POST /api/v1/clusters/elasticsearch/{cluster_id}/plan/_migrate

Path parameters

Name Type Required Description

cluster_id

string

Y

Identifier for the Elasticsearch cluster

Query parameters

Name Type Required Description

template

string

Y

The ID of the deployment template to migrate to

validate_only

boolean; default: false

N

When true, validates the cluster definition, but does not perform the update

Responses

200
(ElasticsearchClusterPlan) The current cluster plan migrated to the specified deployment template.
202
(ClusterCrudResponse) The plan definition was valid and the updated plan is in progress
400
(BasicFailedReply) Migrating to the specified template would lead to an invalid or unsupported cluster definition (code: 'clusters.cluster_invalid_plan' and 'clusters.plan_feature_not_implemented')
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
412
(BasicFailedReply) There is not currently applied plan - eg the cluster has not finished provisioning, or the provisioning failed (code: 'clusters.cluster_plan_state_error')
449
(BasicFailedReply) Elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPOST {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/plan/_migrate \
-u $CLOUD_USER:$CLOUD_KEY

Get plan activity

Retrieves the active and historical plan information for the Elasticsearch cluster.

Request

GET /api/v1/clusters/elasticsearch/{cluster_id}/plan/activity

Path parameters

Name Type Required Description

cluster_id

string

Y

The Elasticsearch cluster identifier.

Query parameters

Name Type Required Description

convert_legacy_plans

boolean; default: false

N

When true, converts the plans to the 2.0.x format. When false, uses the 1.x format. The default is false.

enrich_with_template

boolean; default: true

N

When plans are shown, includes the missing elements from the applicable deployment template.

show_plan_defaults

boolean; default: false

N

When plans are shown, includes the default values in the response. NOTE: This option results in large responses.

show_plan_logs

boolean; default: true

N

Includes the active, pending, and historical plan information in the attempt log. NOTE: This option can result in large responses.

Responses

200
(ElasticsearchClusterPlansInfo) Returning the plan activity for the specified Elasticsearch cluster
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/plan/activity \
-u $CLOUD_USER:$CLOUD_KEY

Cancel pending plan

Cancels the pending plan of the Elasticsearch cluster.

Request

DELETE /api/v1/clusters/elasticsearch/{cluster_id}/plan/pending

Path parameters

Name Type Required Description

cluster_id

string

Y

The Elasticsearch cluster identifier.

Query parameters

Name Type Required Description

ignore_missing

boolean; default: false

N

When true, returns successfully, even when plans are pending. The default is false.

Responses

200
(EmptyResponse) The pending plan has been successfully cancelled
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
412
(BasicFailedReply) There is not currently applied plan - eg the cluster has not finished provisioning, or the provisioning failed (code: 'clusters.cluster_plan_state_error')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XDELETE {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/plan/pending \
-u $CLOUD_USER:$CLOUD_KEY

Get pending plan

Retrieves the pending plan of the cluster.

Request

GET /api/v1/clusters/elasticsearch/{cluster_id}/plan/pending

Path parameters

Name Type Required Description

cluster_id

string

Y

The Elasticsearch cluster identifier.

Query parameters

Name Type Required Description

convert_legacy_plans

boolean; default: false

N

When true, converts the plans to the 2.0.x format. When false, uses the 1.x format. The default is false.

enrich_with_template

boolean; default: true

N

When plans are shown, includes the missing elements from the applicable deployment template.

show_plan_defaults

boolean; default: false

N

When plans are shown, includes the default values in the response. NOTE: This option results in large responses.

Responses

200

(ElasticsearchClusterPlan) The cluster has a pending plan currently being applied to the cluster

Headers

x-cloud-resource-created (string)
The date-time when the resource was created (ISO format relative to UTC)
x-cloud-resource-last-modified (string)
The date-time when the resource was last modified (ISO format relative to UTC)
x-cloud-resource-version (string)
The resource version, which is used to avoid update conflicts with concurrent operations
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
412
(BasicFailedReply) There is not currently applied plan - eg the cluster has not finished provisioning, or the provisioning failed (code: 'clusters.cluster_plan_state_error')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/plan/pending \
-u $CLOUD_USER:$CLOUD_KEY

Set legacy security settings

Sets the legacy Shield security settings for a 2.x Elasticsearch cluster.

Request

PUT /api/v1/clusters/elasticsearch/{cluster_id}/settings/security/legacy

Path parameters

Name Type Required Description

cluster_id

string

Y

The Elasticsearch cluster identifier.

Request body

(LegacySecuritySettings) (required) The legacy security settings

Responses

200
(LegacySecuritySettings) Returns the updated legacy security settings for the specified cluster
404
(BasicFailedReply) The cluster specified at {cluster_id} could not be found (code: 'clusters.cluster_not_found')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPUT {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/settings/security/legacy \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "roles_yaml" : "string",
   "users_roles_yaml" : "string",
   "users_yaml" : "string"
}
'

Get cluster snapshot settings

Missing description

Request

GET /api/v1/clusters/elasticsearch/{cluster_id}/snapshot/settings

Path parameters

Name Type Required Description

cluster_id

string

Y

Identifier for the Elasticsearch cluster

Responses

200

(ClusterSnapshotSettings) The cluster snapshot settings were successfully returned

Headers

x-cloud-resource-created (string)
The date-time when the resource was created (ISO format relative to UTC)
x-cloud-resource-last-modified (string)
The date-time when the resource was last modified (ISO format relative to UTC)
x-cloud-resource-version (string)
The resource version, which is used to avoid update conflicts with concurrent operations
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XGET {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/snapshot/settings \
-u $CLOUD_USER:$CLOUD_KEY

Update cluster snapshot settings

Any changes in the PATCHed object will be applied to the snapshot settings object. PATCHing existing fields will cause same values to be re-applied. PATCHing a value of 'null' will cause the field to be reverted to its default value or removed if no default value exists

Request

PATCH /api/v1/clusters/elasticsearch/{cluster_id}/snapshot/settings

Path parameters

Name Type Required Description

cluster_id

string

Y

Identifier for the Elasticsearch cluster

Query parameters

Name Type Required Description

version

integer

N

If specified then checks for conflicts against the version of the cluster snapshot settings (returned in 'x-cloud-resource-version' of the GET request)

Request body

(ClusterSnapshotSettings) (required) The cluster snapshot settings including updated values

Responses

200

(ClusterSnapshotSettings) The cluster snapshot settings were successfully updated

Headers

x-cloud-resource-created (string)
The date-time when the resource was created (ISO format relative to UTC)
x-cloud-resource-last-modified (string)
The date-time when the resource was last modified (ISO format relative to UTC)
x-cloud-resource-version (string)
The resource version, which is used to avoid update conflicts with concurrent operations
403
(BasicFailedReply) The provided action was prohibited for the given cluster.
404
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
449
(BasicFailedReply) elevated permissions are required. (code: '"root.needs_elevated_permissions"')
Warning

To perform this operation, you must be authenticated by means of one of the following methods: apiKey, basicAuth.

Request example

curl -XPATCH {{hostname}}/api/v1/clusters/elasticsearch/{cluster_id}/snapshot/settings \
-u $CLOUD_USER:$CLOUD_KEY \
-H 'Content-Type: application/json' \
-d '
{
   "enabled" : true,
   "interval" : "string",
   "pending_interval" : "string",
   "repository" : {
      "default" : {},
      "reference" : {
         "repository_name" : "string"
      },
      "static" : {
         "repository_type" : "string",
         "settings" : {}
      }
   },
   "repository_name" : "string",
   "retention" : {
      "max_age" : "string",
      "snapshots" : 0
   },
   "suspended" : [
      "string"
   ],
   "wait_time_after_snapshotting" : "string"
}
'