Stack - Versions - CRUD

Get stack versions

By default, retrieves only the available Elastic Stack versions. To retrieve all of the Elastic Stack versions, use the show_deleted parameter.

Request

GET /api/v1/stack/versions

Query parameters

NameTypeRequiredDescription

show_deleted

boolean; default: false

N

Whether to show deleted stack versions or not

show_unusable

boolean; default: false

N

Whether to show versions that are unusable by the authenticated user

Responses

200
(StackVersionConfigs) The list of all available Elastic Stack versions are retrieved, including the template version and structure.

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/stack/versions \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Upload stack pack

Creates or updates an Elastic Stack pack and template. The endpoint supports multipart/form-data requests, as well as application/zip and application/octet-stream requests with a binary body. The maximum size of the payload is 1Mb. When the archive contains an Elastic Stack configuration that is available through the API, the configuration and template are overwritten.

Request

POST /api/v1/stack/versions

Form Parameters

NameTypeRequiredDescription

file

file

Y

Zip file that contains one or multiple stack configurations

Responses

200
(StackVersionArchiveProcessingResult) The Elastic Stack pack successfully processed.
400

(BasicFailedReply) * There is an error in the file. Choose a different file, then try again. (code: stackpack.bad_archive) * Some unexpected error occurred. (code: stackpack.unknown_internal_error)

Headers

x-cloud-error-codes (string; allowed values: [stackpack.bad_archive, stackpack.unknown_internal_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 example

curl -XPOST {{hostname}}/api/v1/stack/versions \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Delete stack version

Uses the deleted flag, which removes only that version of the Elastic Stack from the list of available versions. To restore the version, send an update request. For more information, see the PUT request.

Request

DELETE /api/v1/stack/versions/{version}

Path parameters

NameTypeRequiredDescription

version

string

Y

The Elastic Stack version. For example, 5.3.1 or 5.0.0-RC4.

Responses

200
(EmptyResponse) The deleted flag is applied to the specified Elastic Stack version.
404

(BasicFailedReply) The Elastic Stack version can't be found. (code: stackpack.version_not_found)

Headers

x-cloud-error-codes (string; allowed values: [stackpack.version_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 -XDELETE {{hostname}}/api/v1/stack/versions/{version} \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Get stack version

Retrieves the Elastic Stack version and template.

Request

GET /api/v1/stack/versions/{version}

Path parameters

NameTypeRequiredDescription

version

string

Y

The Elastic Stack version. For example, 5.3.1 or 5.0.0-RC4.

Responses

200
(StackVersionConfig) The Elastic Stack version is found.
404

(BasicFailedReply) The Elastic Stack version can't be found. (code: stackpack.version_not_found)

Headers

x-cloud-error-codes (string; allowed values: [stackpack.version_not_found])
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 -XGET {{hostname}}/api/v1/stack/versions/{version} \
-H "Authorization: ApiKey $CLOUD_API_KEY"

Update stack version

Updates the Elastic Stack version configuration.

Request

PUT /api/v1/stack/versions/{version}

Path parameters

NameTypeRequiredDescription

version

string

Y

The Elastic Stack version. For example, 5.3.1 or 5.0.0-RC4.

Request body

(StackVersionConfigPost) (required) Elastic Stack configuration object

Responses

200
(StackVersionConfig) The Elastic Stack version successfully updated.
404

(BasicFailedReply) The Elastic Stack version can't be found. (code: stackpack.missing_platform_version)

Headers

x-cloud-error-codes (string; allowed values: [stackpack.missing_platform_version])
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 -XPUT {{hostname}}/api/v1/stack/versions/{version} \
-H "Authorization: ApiKey $CLOUD_API_KEY" \
-H 'Content-Type: application/json' \
-d '
{
   "apm" : {
      "blacklist" : [
         "string"
      ],
      "capacity_constraints" : {
         "max" : 0,
         "min" : 0
      },
      "compatible_node_types" : [
         "string"
      ],
      "docker_image" : "string",
      "settings" : {},
      "version" : "string"
   },
   "appsearch" : {
      "blacklist" : [
         "string"
      ],
      "capacity_constraints" : null,
      "compatible_node_types" : [
         "string"
      ],
      "docker_image" : "string",
      "node_types" : [
         {
            "capacity_constraints" : null,
            "compatible_node_types" : [
               "string"
            ],
            "description" : "string",
            "mandatory" : true,
            "name" : "string",
            "node_type" : "string",
            "settings" : {}
         }
      ],
      "settings" : {},
      "version" : "string"
   },
   "elasticsearch" : {
      "blacklist" : [
         "string"
      ],
      "capacity_constraints" : null,
      "compatible_node_types" : [
         "string"
      ],
      "default_plugins" : [
         "string"
      ],
      "docker_image" : "string",
      "node_types" : [
         null
      ],
      "plugins" : [
         "string"
      ],
      "settings" : {}
   },
   "enterprisesearch" : {
      "blacklist" : [
         "string"
      ],
      "capacity_constraints" : null,
      "compatible_node_types" : [
         "string"
      ],
      "docker_image" : "string",
      "node_types" : [
         null
      ],
      "settings" : {},
      "version" : "string"
   },
   "kibana" : {
      "blacklist" : [
         "string"
      ],
      "capacity_constraints" : null,
      "compatible_node_types" : [
         "string"
      ],
      "docker_image" : "string",
      "settings" : {},
      "version" : "string"
   },
   "metadata" : {
      "min_platform_version" : "string",
      "notes" : "string",
      "pre_release" : true,
      "schema_version" : 0
   },
   "sitesearch" : {
      "blacklist" : [
         "string"
      ],
      "capacity_constraints" : null,
      "compatible_node_types" : [
         "string"
      ],
      "docker_image" : "string",
      "node_types" : [
         null
      ],
      "settings" : {},
      "version" : "string"
   }
}
'