Deployment - Commands

Search Deployments

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

Request

POST /api/v1/deployments/_search

Request body

(SearchRequest) (Optional) The search request to execute. NOTE: When not specified, all of the deployments are matched.

Responses

200
(DeploymentsSearchResponse) The list of deployments that match the specified query and belong to the authenticated user
401
(BasicFailedReply) You are not authorized to perform this action

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/deployments/_search \
-H "Authorization: ApiKey $CLOUD_API_KEY" \
-H 'Content-Type: application/json' \
-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" : [
      {}
   ]
}
'

Restart Deployment Elasticsearch Resource

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.

Request

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

Path parameters

NameTypeRequiredDescription

deployment_id

string

Y

Identifier for the Deployment

ref_id

string

Y

User-specified RefId for the Resource

Query parameters

NameTypeRequiredDescription

cancel_pending

boolean; default: false

N

If true, will cancel any pending plans before restarting (else will 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 the time, or a comma-separated list of attributes of the instances

restore_snapshot

boolean; default: true

N

If restoring from shutdown and true (the default), then will restore the cluster from the last snapshot (if available)

shard_init_wait_time

integer as int64; 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

Responses

202
(DeploymentResourceCommandResponse) The restart command was issued successfully
404
(BasicFailedReply) The Resource specified by {ref_id} cannot be found
422
(BasicFailedReply) The command sent to a Resource found the Resource in an illegal state, the error message gives more details
449
(BasicFailedReply) elevated permissions are required. (code: '"root.unauthorized.rbac.elevated_permissions_required"')

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/deployments/{deployment_id}/elasticsearch/{ref_id}/_restart \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Shutdown Deployment Elasticsearch Resource

Shutdown Elasticsearch Resource belonging to a given Deployment.

Request

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

Path parameters

NameTypeRequiredDescription

deployment_id

string

Y

Identifier for the Deployment

ref_id

string

Y

User-specified RefId for the Resource

Query parameters

NameTypeRequiredDescription

hide

boolean; default: false

N

Hide cluster on shutdown. Hidden clusters are not listed by default

skip_snapshot

boolean; default: false

N

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

Responses

200
(DeploymentResourceCommandResponse) Standard response
401
(BasicFailedReply) You are not authorized to perform this action
404
(BasicFailedReply) The Deployment specified by {deployment_id} cannot be found
500
(BasicFailedReply) We have failed you.

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/deployments/{deployment_id}/elasticsearch/{ref_id}/_shutdown \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Start all instances

Starts all instances belonging to a Deployment Resource.

Request

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

Path parameters

NameTypeRequiredDescription

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)

Responses

202
(DeploymentResourceCommandResponse) The start command was issued successfully
403
(BasicFailedReply) The start command was prohibited for the given Resource.
404
(BasicFailedReply) The Resource specified by {ref_id} cannot be found
422
(BasicFailedReply) The command sent to a Resource found the Resource in an illegal state, the error message gives more details
449
(BasicFailedReply) elevated permissions are required. (code: '"root.unauthorized.rbac.elevated_permissions_required"')

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/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/_start \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Stop all instances

Stops all instances belonging to a Deployment Resource.

Request

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

Path parameters

NameTypeRequiredDescription

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)

Responses

202
(DeploymentResourceCommandResponse) The stop command was issued successfully
403
(BasicFailedReply) The stop command was prohibited for the given Resource.
404
(BasicFailedReply) The Resource specified by {ref_id} cannot be found
422
(BasicFailedReply) The command sent to a Resource found the Resource in an illegal state, the error message gives more details
449
(BasicFailedReply) elevated permissions are required. (code: '"root.unauthorized.rbac.elevated_permissions_required"')

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/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/_stop \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Start maintenance mode (all instances)

Starts maintenance mode of all instances belonging to a Resource.

Request

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

Path parameters

NameTypeRequiredDescription

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)

Responses

202
(DeploymentResourceCommandResponse) The start maintenance command was issued successfully
403
(BasicFailedReply) The start maintenance mode command was prohibited for the given Resource.
404
(BasicFailedReply) The Resource specified by {ref_id} cannot be found
422
(BasicFailedReply) The command sent to a Resource found the Resource in an illegal state, the error message gives more details
449
(BasicFailedReply) elevated permissions are required. (code: '"root.unauthorized.rbac.elevated_permissions_required"')

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/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/maintenance-mode/_start \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Stop maintenance mode (all instances)

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

Request

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

Path parameters

NameTypeRequiredDescription

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)

Responses

202
(DeploymentResourceCommandResponse) The stop maintenance mode command was issued successfully
403
(BasicFailedReply) The stop maintenance mode command was prohibited for the given Resource.
404
(BasicFailedReply) The Resource specified by {ref_id} cannot be found
422
(BasicFailedReply) The command sent to a Resource found the Resource in an illegal state, the error message gives more details
449
(BasicFailedReply) elevated permissions are required. (code: '"root.unauthorized.rbac.elevated_permissions_required"')

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/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/maintenance-mode/_stop \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Start instances

Starts instances belonging to a Deployment Resource.

Request

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

Path parameters

NameTypeRequiredDescription

deployment_id

string

Y

Identifier for the Deployment

instance_ids

array[string]

Y

Comma-delimited list of instance identifiers of the Resource

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 parameters

NameTypeRequiredDescription

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

Responses

202
(DeploymentResourceCommandResponse) The start command was issued successfully
403
(BasicFailedReply) The start command was prohibited for the given Resource.
404
(BasicFailedReply) The Resource specified by {ref_id} cannot be found
422
(BasicFailedReply) The command sent to a Resource found the Resource in an illegal state, the error message gives more details
449
(BasicFailedReply) elevated permissions are required. (code: '"root.unauthorized.rbac.elevated_permissions_required"')

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/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/_start \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Stop of instances

Stops instances belonging to a Deployment Resource.

Request

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

Path parameters

NameTypeRequiredDescription

deployment_id

string

Y

Identifier for the Deployment

instance_ids

array[string]

Y

Comma-delimited list of instance identifiers of the Resource

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 parameters

NameTypeRequiredDescription

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

Responses

202
(DeploymentResourceCommandResponse) The stop command was issued successfully
403
(BasicFailedReply) The stop command was prohibited for the given Resource.
404
(BasicFailedReply) The Resource specified by {ref_id} cannot be found
422
(BasicFailedReply) The command sent to a Resource found the Resource in an illegal state, the error message gives more details
449
(BasicFailedReply) elevated permissions are required. (code: '"root.unauthorized.rbac.elevated_permissions_required"')

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/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/_stop \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Start maintenance mode

Starts maintenance mode of instances belonging to a Deployment Resource.

Request

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

Path parameters

NameTypeRequiredDescription

deployment_id

string

Y

Identifier for the Deployment

instance_ids

array[string]

Y

Comma-delimited list of instance identifiers of the Resource

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 parameters

NameTypeRequiredDescription

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

Responses

202
(DeploymentResourceCommandResponse) The stop maintenance command was issued successfully
403
(BasicFailedReply) The start maintenance mode command was prohibited for the given Resource.
404
(BasicFailedReply) The Resource specified by {ref_id} cannot be found
422
(BasicFailedReply) The command sent to a Resource found the Resource in an illegal state, the error message gives more details
449
(BasicFailedReply) elevated permissions are required. (code: '"root.unauthorized.rbac.elevated_permissions_required"')

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/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/maintenance-mode/_start \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Stop maintenance mode

Stops maintenance mode of instances belonging to a Deployment Resource.

Request

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

Path parameters

NameTypeRequiredDescription

deployment_id

string

Y

Identifier for the Deployment

instance_ids

array[string]

Y

Comma-delimited list of instance identifiers of the Resource

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 parameters

NameTypeRequiredDescription

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

Responses

202
(DeploymentResourceCommandResponse) The stop maintenance mode command was issued successfully
403
(BasicFailedReply) The stop maintenance mode command was prohibited for the given Resource.
404
(BasicFailedReply) The Resource specified by {ref_id} cannot be found
422
(BasicFailedReply) The command sent to a Resource found the Resource in an illegal state, the error message gives more details
449
(BasicFailedReply) elevated permissions are required. (code: '"root.unauthorized.rbac.elevated_permissions_required"')

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/deployments/{deployment_id}/{resource_kind}/{ref_id}/instances/{instance_ids}/maintenance-mode/_stop \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Restart Deployment Stateless Resource

Restarts an 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.

Request

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

Path parameters

NameTypeRequiredDescription

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]

Y

The kind of stateless resource

Query parameters

NameTypeRequiredDescription

cancel_pending

boolean; default: false

N

If true, will cancel any pending plans before restarting (else will error)

Responses

202
(DeploymentResourceCommandResponse) The restart command was issued successfully
404

(BasicFailedReply) 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_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 example

curl -XPOST {{hostname}}/api/v1/deployments/{deployment_id}/{stateless_resource_kind}/{ref_id}/_restart \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Shutdown Deployment Stateless Resource

Shutdown Stateless Resource belonging to a given Deployment.

Request

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

Path parameters

NameTypeRequiredDescription

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]

Y

The kind of stateless resource

Query parameters

NameTypeRequiredDescription

hide

boolean; default: false

N

Hide cluster on shutdown. Hidden clusters are not listed by default

skip_snapshot

boolean; default: false

N

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

Responses

200
(DeploymentResourceCommandResponse) Standard response
404

(BasicFailedReply) 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_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 example

curl -XPOST {{hostname}}/api/v1/deployments/{deployment_id}/{stateless_resource_kind}/{ref_id}/_shutdown \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Upgrade Kibana, APM, AppSearch inside Deployment

Upgrades a running cluster.

Request

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

Path parameters

NameTypeRequiredDescription

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]

Y

The kind of stateless resource

Query parameters

NameTypeRequiredDescription

validate_only

boolean; default: false

N

When true, returns the update version without performing the upgrade

Responses

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

(BasicFailedReply) 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_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 example

curl -XPOST {{hostname}}/api/v1/deployments/{deployment_id}/{stateless_resource_kind}/{ref_id}/_upgrade \
-H "Authorization: ApiKey $CLOUD_API_KEY"