Deployment - Commandsedit

Search Deploymentsedit

Retrieves the information for all of the deployments that match the specified query.

Requestedit

POST /api/v1/deployments/_search

Request bodyedit

(SearchRequest) (Optional) The search query to run. When not specified, all of the deployments are matched.

Responsesedit

200

(DeploymentsSearchResponse) The list of deployments that match the specified query and belong to the authenticated user.

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

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/_search \
-H "Authorization: ApiKey $EC_API_KEY" \
-d '
{
   "from" : 0,
   "query" : {
      "bool" : {
         "filter" : [
            null
         ],
         "minimum_should_match" : 0,
         "must" : [
            null
         ],
         "must_not" : [
            null
         ],
         "should" : [
            null
         ]
      },
      "exists" : {
         "field" : "string"
      },
      "match" : {
         "some_property" : {
            "analyzer" : "string",
            "minimum_should_match" : 0,
            "operator" : "string",
            "query" : "string"
         }
      },
      "match_all" : {},
      "match_none" : {},
      "nested" : {
         "path" : "string",
         "query" : null,
         "score_mode" : "string"
      },
      "prefix" : {
         "some_property" : {
            "boost" : 0.1,
            "value" : "string"
         }
      },
      "query_string" : {
         "allow_leading_wildcard" : true,
         "analyzer" : "string",
         "default_field" : "string",
         "default_operator" : "string",
         "query" : "string"
      },
      "range" : {
         "some_property" : {
            "boost" : 0.1,
            "format" : "string",
            "gt" : {},
            "gte" : {},
            "lt" : {},
            "lte" : {},
            "time_zone" : "string"
         }
      },
      "term" : {
         "some_property" : {
            "value" : {}
         }
      }
   },
   "size" : 0,
   "sort" : [
      {}
   ]
}
'

Migrate Elasticsearch resource to use ILMedit

Migrates the specified Elasticsearch resource to use ILM.

Requestedit

POST /api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/_enable-ilm

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource.

Query parametersedit

Name Type Required Description

validate_only

boolean; default: false

N

When true, does not enable ILM but returns warnings if any applications may lose availability during ILM migration.

Request bodyedit

(EnableIlmRequest) (required) Information to build the ILM policies that will be created

Responsesedit

200

(DeploymentResourceCommandResponse) Standard response

404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) We have failed you. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/_enable-ilm \
-H "Authorization: ApiKey $EC_API_KEY" \
-d '
{
   "index_patterns" : [
      {
         "index_pattern" : "string",
         "node_attributes" : {
            "some_property" : "string"
         },
         "policy_name" : "string"
      }
   ]
}
'

Migrate Elasticsearch resource to use SLMedit

Migrates the specified Elasticsearch resource to use SLM.

Requestedit

POST /api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/_enable-slm

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource.

Query parametersedit

Name Type Required Description

validate_only

boolean; default: false

N

When true, does not enable SLM but returns warnings if any applications may lose availability during SLM migration.

Responsesedit

200

(DeploymentResourceCommandResponse) Standard response

404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) We have failed you. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/_enable-slm \
-H "Authorization: ApiKey $EC_API_KEY"

Reset elastic user passwordedit

Resets the password of the 'elastic' user.

Requestedit

POST /api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/_reset-password

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource.

Responsesedit

200

(ElasticsearchElasticUserPasswordResetResponse) The password reset was out carried successfully

404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) Failed to reset the 'elastic' user's password. (code: deployments.elasticsearch.password_reset_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.elasticsearch.password_reset_error])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/_reset-password \
-H "Authorization: ApiKey $EC_API_KEY"

Restart Deployment Elasticsearch Resourceedit

Restarts an Elasticsearch Resource. If a Resource is active: this command re-applies the existing plan but applies a "cluster_reboot", which issues a restart command and waits for it to complete. If a Resource is inactive: this command starts it up with the most recent successful plan.

Requestedit

POST /api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/_restart

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource.

Query parametersedit

Name Type Required Description

cancel_pending

boolean; default: false

N

If true, cancels any pending plans before restarting. If false and there are pending plans, returns an error.

group_attribute

string; default: "__zone__"

N

Indicates the property or properties used to divide the list of instances to restart in groups. Valid options are: '__all__' (restart all at once), '__zone__' by logical zone, '__name__' one instance at a time, or a comma-separated list of attributes of the instances

restore_snapshot

boolean; default: true

N

When set to true and restoring from shutdown, then will restore the cluster from the last snapshot (if available).

shard_init_wait_time

integer; default: 600

N

The time, in seconds, to wait for shards that show no progress of initializing, before rolling the next group (default: 10 minutes)

skip_snapshot

boolean; default: true

N

If true, will not take a snapshot of the cluster before restarting.

Responsesedit

202

(DeploymentResourceCommandResponse) The restart command was issued successfully.

404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found])
The error codes associated with the response
422

(BasicFailedReply) The command sent to a Resource found the Resource in an illegal state, the error message gives more details. (code: deployments.deployment_resource_plan_change_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_plan_change_error])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) A Resource that was previously stored no longer exists. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/_restart \
-H "Authorization: ApiKey $EC_API_KEY"

Shutdown Deployment Elasticsearch Resourceedit

Shutdown Elasticsearch Resource belonging to a given Deployment.

Requestedit

POST /api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/_shutdown

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource.

Query parametersedit

Name Type Required Description

hide

boolean

N

Hide cluster on shutdown. Hidden clusters are not listed by default. Only applicable for Platform administrators.

skip_snapshot

boolean; default: false

N

If true, will skip taking a snapshot of the cluster before shutting the cluster down (if even possible).

Responsesedit

200

(DeploymentResourceCommandResponse) Standard response.

400

(BasicFailedReply) Parameter is restricted and can only be set by a Platform administrator. (code: deployments.restricted_parameter)

Headers

x-cloud-error-codes (string; allowed values: [deployments.restricted_parameter])
The error codes associated with the response
404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found])
The error codes associated with the response
500

(BasicFailedReply) A Resource that was previously stored no longer exists. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/elasticsearch/{ref_id}/_shutdown \
-H "Authorization: ApiKey $EC_API_KEY"

Start all instancesedit

Starts all instances belonging to a Deployment Resource.

Requestedit

POST /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/_start

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource.

resource_kind

string

Y

The kind of resource (one of elasticsearch, kibana or apm).

Responsesedit

202

(DeploymentResourceCommandResponse) The start command was issued successfully.

403

(BasicFailedReply) The start maintenance mode command was prohibited for the given Resource. (code: deployments.instance_update_prohibited_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.instance_update_prohibited_error])
The error codes associated with the response
404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found) * One or more instances of the given resource type are missing. (code: deployments.instances_missing_on_update_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found, deployments.instances_missing_on_update_error])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) A Resource that was previously stored no longer exists. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/_start \
-H "Authorization: ApiKey $EC_API_KEY"

Stop all instancesedit

Stops all instances belonging to a Deployment Resource.

Requestedit

POST /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/_stop

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource.

resource_kind

string

Y

The kind of resource (one of elasticsearch, kibana or apm).

Responsesedit

202

(DeploymentResourceCommandResponse) The stop command was issued successfully.

403

(BasicFailedReply) The stop maintenance mode command was prohibited for the given Resource. (code: deployments.instance_update_prohibited_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.instance_update_prohibited_error])
The error codes associated with the response
404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found) * One or more instances of the given resource type are missing. (code: deployments.instances_missing_on_update_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found, deployments.instances_missing_on_update_error])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) A Resource that was previously stored no longer exists. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/_stop \
-H "Authorization: ApiKey $EC_API_KEY"

Start maintenance mode (all instances)edit

Starts maintenance mode of all instances belonging to a Deployment Resource.

Requestedit

POST /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/maintenance-mode/_start

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource.

resource_kind

string

Y

The kind of resource (one of elasticsearch, kibana or apm).

Responsesedit

202

(DeploymentResourceCommandResponse) The start maintenance command was issued successfully.

403

(BasicFailedReply) The start maintenance mode command was prohibited for the given Resource. (code: deployments.instance_update_prohibited_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.instance_update_prohibited_error])
The error codes associated with the response
404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found) * One or more instances of the given resource type are missing. (code: deployments.instances_missing_on_update_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found, deployments.instances_missing_on_update_error])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) A Resource that was previously stored no longer exists. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/maintenance-mode/_start \
-H "Authorization: ApiKey $EC_API_KEY"

Stop maintenance mode (all instances)edit

Stops maintenance mode of all instances belonging to a Deployment Resource.

Requestedit

POST /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/maintenance-mode/_stop

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource.

resource_kind

string

Y

The kind of resource (one of elasticsearch, kibana or apm).

Responsesedit

202

(DeploymentResourceCommandResponse) The stop maintenance mode command was issued successfully.

403

(BasicFailedReply) The stop maintenance mode command was prohibited for the given Resource. (code: deployments.instance_update_prohibited_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.instance_update_prohibited_error])
The error codes associated with the response
404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found) * One or more instances of the given resource type are missing. (code: deployments.instances_missing_on_update_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found, deployments.instances_missing_on_update_error])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) A Resource that was previously stored no longer exists. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/maintenance-mode/_stop \
-H "Authorization: ApiKey $EC_API_KEY"

Start instancesedit

Starts instances belonging to a Deployment Resource.

Requestedit

POST /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/_start

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

instance_ids

array[string]

Y

A comma-separated list of instance identifiers.

ref_id

string

Y

User-specified RefId for the Resource.

resource_kind

string

Y

The kind of resource (one of elasticsearch, kibana or apm).

Query parametersedit

Name Type Required Description

ignore_missing

boolean; default: false

N

If true and the instance does not exist then quietly proceed to the next instance, otherwise treated as an error

Responsesedit

202

(DeploymentResourceCommandResponse) The start command was issued successfully.

403

(BasicFailedReply) The start maintenance mode command was prohibited for the given Resource. (code: deployments.instance_update_prohibited_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.instance_update_prohibited_error])
The error codes associated with the response
404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found) * One or more instances of the given resource type are missing. (code: deployments.instances_missing_on_update_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found, deployments.instances_missing_on_update_error])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) A Resource that was previously stored no longer exists. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/_start \
-H "Authorization: ApiKey $EC_API_KEY"

Stop instancesedit

Stops instances belonging to a Deployment Resource.

Requestedit

POST /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/_stop

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

instance_ids

array[string]

Y

A comma-separated list of instance identifiers.

ref_id

string

Y

User-specified RefId for the Resource.

resource_kind

string

Y

The kind of resource (one of elasticsearch, kibana or apm).

Query parametersedit

Name Type Required Description

ignore_missing

boolean; default: false

N

If true and the instance does not exist then quietly proceed to the next instance, otherwise treated as an error.

Responsesedit

202

(DeploymentResourceCommandResponse) The stop command was issued successfully.

403

(BasicFailedReply) The start maintenance mode command was prohibited for the given Resource. (code: deployments.instance_update_prohibited_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.instance_update_prohibited_error])
The error codes associated with the response
404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found) * One or more instances of the given resource type are missing. (code: deployments.instances_missing_on_update_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found, deployments.instances_missing_on_update_error])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) A Resource that was previously stored no longer exists. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/_stop \
-H "Authorization: ApiKey $EC_API_KEY"

Start maintenance modeedit

Starts maintenance mode of instances belonging to a Deployment Resource.

Requestedit

POST /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/maintenance-mode/_start

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

instance_ids

array[string]

Y

A comma-separated list of instance identifiers.

ref_id

string

Y

User-specified RefId for the Resource.

resource_kind

string

Y

The kind of resource (one of elasticsearch, kibana or apm).

Query parametersedit

Name Type Required Description

ignore_missing

boolean; default: false

N

If true and the instance does not exist then quietly proceed to the next instance, otherwise treated as an error.

Responsesedit

202

(DeploymentResourceCommandResponse) The start maintenance command was issued successfully.

403

(BasicFailedReply) The start maintenance mode command was prohibited for the given Resource. (code: deployments.instance_update_prohibited_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.instance_update_prohibited_error])
The error codes associated with the response
404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found) * One or more instances of the given resource type are missing. (code: deployments.instances_missing_on_update_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found, deployments.instances_missing_on_update_error])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) A Resource that was previously stored no longer exists. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/maintenance-mode/_start \
-H "Authorization: ApiKey $EC_API_KEY"

Stop maintenance modeedit

Stops maintenance mode of instances belonging to a Resource.

Requestedit

POST /api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/maintenance-mode/_stop

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

instance_ids

array[string]

Y

A comma-separated list of instance identifiers.

ref_id

string

Y

User-specified RefId for the Resource.

resource_kind

string

Y

The kind of resource (one of elasticsearch, kibana or apm).

Query parametersedit

Name Type Required Description

ignore_missing

boolean; default: false

N

If true and the instance does not exist then quietly proceed to the next instance, otherwise treated as an error.

Responsesedit

202

(DeploymentResourceCommandResponse) The stop maintenance mode command was issued successfully.

403

(BasicFailedReply) The stop maintenance mode command was prohibited for the given Resource. (code: deployments.instance_update_prohibited_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.instance_update_prohibited_error])
The error codes associated with the response
404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found) * One or more instances of the given resource type are missing. (code: deployments.instances_missing_on_update_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found, deployments.instances_missing_on_update_error])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) A Resource that was previously stored no longer exists. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/maintenance-mode/_stop \
-H "Authorization: ApiKey $EC_API_KEY"

Restart Deployment Stateless Resourceedit

Restarts a Stateless Resource. If a Resource is active: this command re-applies the existing plan but applies a "cluster_reboot", which issues a restart command and waits for it to complete. If a Resource is inactive: this command starts it up with the most recent successful plan.

Requestedit

POST /api/v1/deployments/{deployment_id}/{stateless_resource_kind}/{ref_id}/_restart

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource.

stateless_resource_kind

string; allowed values: [kibana, apm, appsearch, enterprise_search]

Y

The kind of stateless resource

Query parametersedit

Name Type Required Description

cancel_pending

boolean; default: false

N

If true, cancels any pending plans before restarting. If false and there are pending plans, returns an error.

Responsesedit

202

(DeploymentResourceCommandResponse) The restart command was issued successfully

404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found])
The error codes associated with the response
422

(BasicFailedReply) The command sent to a Resource found the Resource in an illegal state, the error message gives more details. (code: deployments.deployment_resource_plan_change_error)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_plan_change_error])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) We have failed you. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{stateless_resource_kind}/{ref_id}/_restart \
-H "Authorization: ApiKey $EC_API_KEY"

Shutdown Deployment Stateless Resourceedit

Shut down Stateless Resource belonging to a given Deployment. Kibana cannot be shut down on Elasticsearch Service as it is required for Elasticsearch administrative functions, such as Snapshot Lifecycle Management and version upgrades.

Requestedit

POST /api/v1/deployments/{deployment_id}/{stateless_resource_kind}/{ref_id}/_shutdown

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource.

stateless_resource_kind

string; allowed values: [kibana, apm, appsearch, enterprise_search]

Y

The kind of stateless resource

Query parametersedit

Name Type Required Description

hide

boolean

N

Hide cluster on shutdown. Hidden clusters are not listed by default. Only applicable for Platform administrators.

skip_snapshot

boolean; default: false

N

If true, will skip taking a snapshot of the cluster before shutting the cluster down (if even possible)

Responsesedit

200

(DeploymentResourceCommandResponse) Standard response

400

(BasicFailedReply) Parameter is restricted and can only be set by a Platform administrator. (code: deployments.restricted_parameter)

Headers

x-cloud-error-codes (string; allowed values: [deployments.restricted_parameter])
The error codes associated with the response
404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response
500

(BasicFailedReply) We have failed you. (code: deployments.deployment_resource_no_longer_exists)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_resource_no_longer_exists])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{stateless_resource_kind}/{ref_id}/_shutdown \
-H "Authorization: ApiKey $EC_API_KEY"

Upgrade Kibana, APM, AppSearch inside Deploymentedit

Upgrades a running cluster.

Requestedit

POST /api/v1/deployments/{deployment_id}/{stateless_resource_kind}/{ref_id}/_upgrade

Path parametersedit

Name Type Required Description

deployment_id

string

Y

Identifier for the Deployment.

ref_id

string

Y

User-specified RefId for the Resource.

stateless_resource_kind

string; allowed values: [kibana, apm, appsearch, enterprise_search]

Y

The kind of stateless resource

Query parametersedit

Name Type Required Description

validate_only

boolean; default: false

N

When true, returns the update version without performing the upgrade

Responsesedit

202

(DeploymentResourceUpgradeResponse) The upgrade command was issued successfully, use the "GET" command on the /{cluster_id} resource to monitor progress

404

(BasicFailedReply) * The Deployment specified by {deployment_id} cannot be found. (code: deployments.deployment_not_found) * The Resource specified by {ref_id} cannot be found. (code: deployments.deployment_resource_not_found)

Headers

x-cloud-error-codes (string; allowed values: [deployments.deployment_not_found, deployments.deployment_resource_not_found])
The error codes associated with the response
449

(BasicFailedReply) Elevated permissions are required. (code: root.unauthorized.rbac.elevated_permissions_required)

Headers

x-cloud-error-codes (string; allowed values: [root.unauthorized.rbac.elevated_permissions_required])
The error codes associated with the response

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

Request exampleedit

curl -XPOST https://api.elastic-cloud.com/api/v1/deployments/{deployment_id}/{stateless_resource_kind}/{ref_id}/_upgrade \
-H "Authorization: ApiKey $EC_API_KEY"